Skip to content

iamfazal/Google-pay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Pay

Offers



Get a card

[GET] /google-pay/offer/card

Request (params)

{
  card: {
    id: String
  },
  issuer: {
    id: String
  }
}

Response

{
  data: OfferObject
}

Sample Request

{
  card: {
    id: 'c789904366304'
  },
  issuer: {
    id: '<ISSUER_ID>'
  }
}

Sample Response

{
  data: {
    kind: 'walletobjects#offerObject',
    classReference: {
      kind: 'walletobjects#offerClass',
      title: 'Discount 12%',
      redemptionChannel: 'online',
      provider: 'Provider name',
      titleImage: {
        kind: 'walletobjects#image',
        sourceUri: {
          uri:
            'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
          description: 'Card logo'
        }
      },
      details: 'Updated Card description',
      id: '<ISSUER_ID>.ct789904366304',
      version: '1',
      issuerName: 'Issuer name',
      messages: [
        {
          kind: 'walletobjects#walletObjectMessage',
          header: 'Campaign message',
          body: 'Campaign message here'
        }
      ],
      reviewStatus: 'approved',
      textModulesData: [
        {
          header: 'Location',
          body: 'Address here'
        },
        {
          header: 'About',
          body: 'Issuer description'
        }
      ],
      linksModuleData: {
        uris: [
          {
            kind: 'walletobjects#uri',
            uri: '1234567890',
            description: 'Phone'
          },
          {
            kind: 'walletobjects#uri',
            uri: '[email protected]',
            description: 'Email'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://issuer-website.com',
            description: 'Website'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://www.facebook.com/issuer-fb',
            description: 'Facebook'
          }
        ]
      },
      hexBackgroundColor: '#f8a400'
    },
    id: '<ISSUER_ID>.c789904366304',
    classId: '<ISSUER_ID>.ct789904366304',
    version: '1',
    state: 'active',
    barcode: {
      kind: 'walletobjects#barcode',
      type: 'qrCode',
      value: 'c789904366304'
    },
    validTimeInterval: {
      kind: 'walletobjects#timeInterval',
      start: {
        date: '2019-08-24T00:00:00Z'
      },
      end: {
        date: '2019-08-28T00:00:00Z'
      }
    },
    hasUsers: false
  }
}

Get all cards

[GET] /google-pay/offer/card/all

Request (params)

{
  cardTemplate: {
    id: String
  },
  issuer: {
    id: String
  }
}

Response

{
  data: [OfferObject]
}

Sample Request

{
  cardTemplate: {
    id: 'ct789904366304'
  },
  issuer: {
    id: '<ISSUER_ID>'
  }
}

Sample Response

{
  data: [
    {
      kind: 'walletobjects#offerObject',
      classReference: {
        kind: 'walletobjects#offerClass',
        title: 'Discount 12%',
        redemptionChannel: 'online',
        provider: 'Provider name',
        titleImage: {
          kind: 'walletobjects#image',
          sourceUri: {
            uri:
              'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
            description: 'Card logo'
          }
        },
        details: 'Updated Card description',
        id: '<ISSUER_ID>.ct789904366304',
        version: '1',
        issuerName: 'Issuer name',
        messages: [
          {
            kind: 'walletobjects#walletObjectMessage',
            header: 'Campaign message',
            body: 'Campaign message here'
          }
        ],
        reviewStatus: 'approved',
        textModulesData: [
          {
            header: 'Location',
            body: 'Address here'
          },
          {
            header: 'About',
            body: 'Issuer description'
          }
        ],
        linksModuleData: {
          uris: [
            {
              kind: 'walletobjects#uri',
              uri: '1234567890',
              description: 'Phone'
            },
            {
              kind: 'walletobjects#uri',
              uri: '[email protected]',
              description: 'Email'
            },
            {
              kind: 'walletobjects#uri',
              uri: 'https://issuer-website.com',
              description: 'Website'
            },
            {
              kind: 'walletobjects#uri',
              uri: 'https://www.facebook.com/issuer-fb',
              description: 'Facebook'
            }
          ]
        },
        hexBackgroundColor: '#f8a400'
      },
      id: '<ISSUER_ID>.c789904366304',
      classId: '<ISSUER_ID>.ct789904366304',
      version: '1',
      state: 'active',
      barcode: {
        kind: 'walletobjects#barcode',
        type: 'qrCode',
        value: 'c789904366304'
      },
      validTimeInterval: {
        kind: 'walletobjects#timeInterval',
        start: {
          date: '2019-08-24T00:00:00Z'
        },
        end: {
          date: '2019-08-28T00:00:00Z'
        }
      },
      hasUsers: false
    }
  ]
}

Create a card

[POST] /google-pay/offer/card

Request (body)

{
  card: {
    id: String,
    validFrom: String, // ISO date
    validTill: String
  },
  cardTemplate: {
    id: String
  },
  issuer: {
    id: String
  }
}

Response

{
  data: OfferObject
}

Sample Request

{
  card: {
    id: 'c789904366304',
    validFrom: "2019-08-25T00:00:00.000Z",
    validTill: "2019-08-28T00:00:00.000Z"
  },
  cardTemplate: {
    id: 'ct789904366304'
  },
  issuer: {
    id: '<ISSUER_ID>'
  }
}

Sample Response

{
  data: {
    kind: 'walletobjects#offerObject',
    classReference: {
      kind: 'walletobjects#offerClass',
      title: 'Discount 12%',
      redemptionChannel: 'online',
      provider: 'Provider name',
      titleImage: {
        kind: 'walletobjects#image',
        sourceUri: {
          uri:
            'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
          description: 'Card logo'
        }
      },
      details: 'Updated Card description',
      id: '<ISSUER_ID>.ct789904366304',
      version: '1',
      issuerName: 'Issuer name',
      messages: [
        {
          kind: 'walletobjects#walletObjectMessage',
          header: 'Campaign message',
          body: 'Campaign message here'
        }
      ],
      reviewStatus: 'approved',
      textModulesData: [
        {
          header: 'Location',
          body: 'Address here'
        },
        {
          header: 'About',
          body: 'Issuer description'
        }
      ],
      linksModuleData: {
        uris: [
          {
            kind: 'walletobjects#uri',
            uri: '1234567890',
            description: 'Phone'
          },
          {
            kind: 'walletobjects#uri',
            uri: '[email protected]',
            description: 'Email'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://issuer-website.com',
            description: 'Website'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://www.facebook.com/issuer-fb',
            description: 'Facebook'
          }
        ]
      },
      hexBackgroundColor: '#f8a400'
    },
    id: '<ISSUER_ID>.c789904366304',
    classId: '<ISSUER_ID>.ct789904366304',
    version: '1',
    state: 'active',
    barcode: {
      kind: 'walletobjects#barcode',
      type: 'qrCode',
      value: 'c789904366304'
    },
    validTimeInterval: {
      kind: 'walletobjects#timeInterval',
      start: {
        date: '2019-08-25T00:00:00Z'
      },
      end: {
        date: '2019-08-28T00:00:00Z'
      }
    }
  }
}

Update a card

[PUT] /google-pay/offer/card

Request (body)

{
  card: {
    id: String,
    validFrom: String, // ISO date
    validTill: String
  },
  cardTemplate: {
    id: String
  },
  issuer: {
    id: String
  }
}

Response

{
  data: OfferObject
}

Sample Request

{
  card: {
    id: 'c789904366304',
    validFrom: "2019-08-24T00:00:00.000Z",
    validTill: "2019-08-28T00:00:00.000Z"
  },
  cardTemplate: {
    id: 'ct789904366304'
  },
  issuer: {
    id: '<ISSUER_ID>'
  }
}

Sample Response

{
  data: {
    kind: 'walletobjects#offerObject',
    classReference: {
      kind: 'walletobjects#offerClass',
      title: 'Discount 12%',
      redemptionChannel: 'online',
      provider: 'Provider name',
      titleImage: {
        kind: 'walletobjects#image',
        sourceUri: {
          uri:
            'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
          description: 'Card logo'
        }
      },
      details: 'Updated Card description',
      id: '<ISSUER_ID>.ct789904366304',
      version: '1',
      issuerName: 'Issuer name',
      messages: [
        {
          kind: 'walletobjects#walletObjectMessage',
          header: 'Campaign message',
          body: 'Campaign message here'
        }
      ],
      reviewStatus: 'approved',
      textModulesData: [
        {
          header: 'Location',
          body: 'Address here'
        },
        {
          header: 'About',
          body: 'Issuer description'
        }
      ],
      linksModuleData: {
        uris: [
          {
            kind: 'walletobjects#uri',
            uri: '1234567890',
            description: 'Phone'
          },
          {
            kind: 'walletobjects#uri',
            uri: '[email protected]',
            description: 'Email'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://issuer-website.com',
            description: 'Website'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://www.facebook.com/issuer-fb',
            description: 'Facebook'
          }
        ]
      },
      hexBackgroundColor: '#f8a400'
    },
    id: '<ISSUER_ID>.c789904366304',
    classId: '<ISSUER_ID>.ct789904366304',
    version: '1',
    state: 'active',
    barcode: {
      kind: 'walletobjects#barcode',
      type: 'qrCode',
      value: 'c789904366304'
    },
    validTimeInterval: {
      kind: 'walletobjects#timeInterval',
      start: {
        date: '2019-08-24T00:00:00Z'
      },
      end: {
        date: '2019-08-28T00:00:00Z'
      }
    }
  }
}

Save a card

[POST] /google-pay/offer/card/save

Request (body)

{
  card: {
    id: String
  },
  cardTemplate: {
    id: String
  },
  issuer: {
    id: String
  }
}

Response

{
  data: {
    url: String
  }
}

Sample Request

{
  card: {
    id: 'c789904366304'
  },
  cardTemplate: {
    id: 'm789904355323'
  },
  issuer: {
    id: '<ISSUER_ID>'
  }
}

Sample Response

{
  data: {
    url: 'https://pay.google.com/gp/v/save/<JWT_TOKEN>'
  }
}

Message a card

[POST] /google-pay/offer/card/message

Request (params)

{
  card: {
    id: String,
    message: {
      body: String,
      header: String,
      startDate:String
    }
  },
  issuer: {
    id: String
  }
}

Response

{
  data: OfferObject
}

Sample Request

{
  card: {
    id: 'c789904366304',
    message: {
      header: 'Hurry!',
      body: 'Offer expires soon!',
      startDate: "2019-08-26T00:00:00.000Z"
    }
  },
  issuer: {
    id: '<ISSUER_ID>'
  }
}

Sample Response

{
  data: {
    resource: {
      kind: 'walletobjects#offerObject',
      classReference: {
        kind: 'walletobjects#offerClass',
        title: 'Discount 12%',
        redemptionChannel: 'online',
        provider: 'Provider name',
        titleImage: {
          kind: 'walletobjects#image',
          sourceUri: {
            uri:
              'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
            description: 'Card logo'
          }
        },
        details: 'Updated Card description',
        id: '<ISSUER_ID>.ct789904366304',
        version: '1',
        issuerName: 'Issuer name',
        messages: [
          {
            kind: 'walletobjects#walletObjectMessage',
            header: 'Campaign message',
            body: 'Campaign message here'
          }
        ],
        reviewStatus: 'approved',
        textModulesData: [
          {
            header: 'Location',
            body: 'Address here'
          },
          {
            header: 'About',
            body: 'Issuer description'
          }
        ],
        linksModuleData: {
          uris: [
            {
              kind: 'walletobjects#uri',
              uri: '1234567890',
              description: 'Phone'
            },
            {
              kind: 'walletobjects#uri',
              uri: '[email protected]',
              description: 'Email'
            },
            {
              kind: 'walletobjects#uri',
              uri: 'https://issuer-website.com',
              description: 'Website'
            },
            {
              kind: 'walletobjects#uri',
              uri: 'https://www.facebook.com/issuer-fb',
              description: 'Facebook'
            }
          ]
        },
        hexBackgroundColor: '#f8a400'
      },
      id: '<ISSUER_ID>.c789904366304',
      classId: '<ISSUER_ID>.ct789904366304',
      version: '1',
      state: 'active',
      barcode: {
        kind: 'walletobjects#barcode',
        type: 'qrCode',
        value: 'c789904366304'
      },
      messages: [
        {
          kind: 'walletobjects#walletObjectMessage',
          header: 'Hurry!',
          body: 'Offer expires soon!',
          displayInterval: {
            kind: 'walletobjects#timeInterval',
            start: {
              date: '2019-08-26T00:00:00Z'
            }
          },
          id: '32597410837010484116',
          messageType: 'expirationNotification'
        }
      ],
      validTimeInterval: {
        kind: 'walletobjects#timeInterval',
        start: {
          date: '2019-08-26T00:00:00Z'
        },
        end: {
          date: '2019-08-28T00:00:00Z'
        }
      }
    }
  }
}

Message all cards

[POST] /google-pay/offer/card/message/all

Request (params)

{
  cardTemplate: {
    id: String,
    message: {
      body: String,
      header: String,
      startDate:String
    }
  },
  issuer: {
    id: String
  }
}

Response

{
  data: OfferClass
}

Sample Request

{
  cardTemplate: {
    id: 'c789904366304',
    message: {
      header: 'Hurry!',
      body: 'Offer expires soon for all!',
      startDate: "2019-08-26T00:00:00.000Z"
    }
  },
  issuer: {
    id: '<ISSUER_ID>'
  }
}

Sample Response

{
  data: {
    resource: {
      kind: 'walletobjects#offerClass',
      title: 'Discount 12%',
      redemptionChannel: 'online',
      provider: 'Provider name',
      titleImage: {
        kind: 'walletobjects#image',
        sourceUri: {
          uri:
            'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
          description: 'Card logo'
        }
      },
      details: 'Updated Card description',
      id: '<ISSUER_ID>.ct789904366304',
      version: '1',
      issuerName: 'Issuer name',
      messages: [
        {
          kind: 'walletobjects#walletObjectMessage',
          header: 'Campaign message',
          body: 'Campaign message here'
        },
        {
          kind: 'walletobjects#walletObjectMessage',
          header: 'Hurry!',
          body: 'Offer expires soon for all!',
          displayInterval: {
            kind: 'walletobjects#timeInterval',
            start: {
              date: '2019-08-26T00:00:00Z'
            }
          },
          id: '94902231747662366435',
          messageType: 'expirationNotification'
        },
        {
          kind: 'walletobjects#walletObjectMessage',
          header: 'Hurry!',
          body: 'Offer expires soon for all!',
          displayInterval: {
            kind: 'walletobjects#timeInterval',
            start: {
              date: '2019-08-26T00:00:00Z'
            }
          },
          id: '88518319458959309495',
          messageType: 'expirationNotification'
        }
      ],
      reviewStatus: 'approved',
      textModulesData: [
        {
          header: 'Location',
          body: 'Address here'
        },
        {
          header: 'About',
          body: 'Issuer description'
        }
      ],
      linksModuleData: {
        uris: [
          {
            kind: 'walletobjects#uri',
            uri: '1234567890',
            description: 'Phone'
          },
          {
            kind: 'walletobjects#uri',
            uri: '[email protected]',
            description: 'Email'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://issuer-website.com',
            description: 'Website'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://www.facebook.com/issuer-fb',
            description: 'Facebook'
          }
        ]
      },
      hexBackgroundColor: '#f8a400'
    }
  }
}

Get a card template

[GET] /google-pay/offer/cardTemplate

Request (params)

{
  cardTemplate: {
    id: String
  },
  issuer: {
    id: String
  }
}

Response

{
  data: OfferClass
}

Sample Request

{
  cardTemplate: {
    id: '<ISSUER_ID>'
  },
  issuer: {
    id: 'ct789904366304'
  }
}

Sample Response

{
  data: {
    kind: 'walletobjects#offerClass',
    title: 'Discount 12%',
    redemptionChannel: 'online',
    provider: 'Provider name',
    titleImage: {
      kind: 'walletobjects#image',
      sourceUri: {
        uri:
          'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
        description: 'Card logo'
      }
    },
    details: 'Card description',
    id: '<ISSUER_ID>.ct789904366304',
    version: '1',
    issuerName: 'Issuer name',
    messages: [
      {
        kind: 'walletobjects#walletObjectMessage',
        header: 'Campaign message',
        body: 'Campaign message here'
      }
    ],
    reviewStatus: 'approved',
    textModulesData: [
      {
        header: 'Location',
        body: 'Address here'
      },
      {
        header: 'About',
        body: 'Issuer description'
      }
    ],
    linksModuleData: {
      uris: [
        {
          kind: 'walletobjects#uri',
          uri: '1234567890',
          description: 'Phone'
        },
        {
          kind: 'walletobjects#uri',
          uri: '[email protected]',
          description: 'Email'
        },
        {
          kind: 'walletobjects#uri',
          uri: 'https://issuer-website.com',
          description: 'Website'
        },
        {
          kind: 'walletobjects#uri',
          uri: 'https://www.facebook.com/issuer-fb',
          description: 'Facebook'
        }
      ]
    },
    hexBackgroundColor: '#f8a400'
  }
}

Get all card templates

[GET] /google-pay/offer/cardTemplate/all

Request (params)

{
  issuer: {
    id: String
  }
}

Response

{
  data: [OfferClass]
}

Sample Request

{
  issuer: {
    id: '<ISSUER_ID>'
  }
}

Sample Response

{
  data: [
    {
      kind: 'walletobjects#offerClass',
      title: 'Discount 12%',
      redemptionChannel: 'online',
      provider: 'Provider name',
      titleImage: {
        kind: 'walletobjects#image',
        sourceUri: {
          uri:
            'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
          description: 'Card logo'
        }
      },
      details: 'Card description',
      id: '<ISSUER_ID>.ct789904366304',
      version: '1',
      issuerName: 'Issuer name',
      messages: [
        {
          kind: 'walletobjects#walletObjectMessage',
          header: 'Campaign message',
          body: 'Campaign message here'
        }
      ],
      reviewStatus: 'approved',
      textModulesData: [
        {
          header: 'Location',
          body: 'Address here'
        },
        {
          header: 'About',
          body: 'Issuer description'
        }
      ],
      linksModuleData: {
        uris: [
          {
            kind: 'walletobjects#uri',
            uri: '1234567890',
            description: 'Phone'
          },
          {
            kind: 'walletobjects#uri',
            uri: '[email protected]',
            description: 'Email'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://issuer-website.com',
            description: 'Website'
          },
          {
            kind: 'walletobjects#uri',
            uri: 'https://www.facebook.com/issuer-fb',
            description: 'Facebook'
          }
        ]
      },
      hexBackgroundColor: '#f8a400'
    }
  ]
}

Create a card template

[POST] /google-pay/offer/cardTemplate

Request (body)

{
  cardTemplate: {
    hexBackgroundColor: String,
    description: String,
    heroImage: String,
    id: String,
    logoUrl: String,
    message: String,
    title: String
  },
  issuer: {
    description: String,
    email: String,
    facebook: String,
    id: String,
    location: String,
    name: String,
    phone: String,
    website: String,
  }
}

Response

{
  data: OfferClass
}

Sample Request

{
  cardTemplate: {
    hexBackgroundColor: '#f8a400',
    description: 'Card description',
    heroImage: 'https://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg',
    id: 'ct789904366304',
    logoUrl: 'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
    message: 'Campaign message here',
    title: 'Discount 12%'
  },
  issuer: {
    description: 'Issuer description',
    email: '[email protected]',
    facebook: 'https://www.facebook.com/issuer-fb',
    id: '<ISSUER_ID>',
    location: 'Address here',
    name: 'Issuer name',
    phone: '1234567890',
    website: 'https://issuer-website.com',
  }
}

Sample Response

{
  data: {
    kind: 'walletobjects#offerClass',
    title: 'Discount 12%',
    redemptionChannel: 'online',
    provider: 'Provider name',
    titleImage: {
      kind: 'walletobjects#image',
      sourceUri: {
        uri:
          'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
        description: 'Card logo'
      }
    },
    details: 'Card description',
    id: '<ISSUER_ID>.ct789904366304',
    version: '1',
    issuerName: 'Issuer name',
    messages: [
      {
        kind: 'walletobjects#walletObjectMessage',
        header: 'Campaign message',
        body: 'Campaign message here'
      }
    ],
    reviewStatus: 'approved',
    textModulesData: [
      {
        header: 'Location',
        body: 'Address here'
      },
      {
        header: 'About',
        body: 'Issuer description'
      }
    ],
    linksModuleData: {
      uris: [
        {
          kind: 'walletobjects#uri',
          uri: '1234567890',
          description: 'Phone'
        },
        {
          kind: 'walletobjects#uri',
          uri: '[email protected]',
          description: 'Email'
        },
        {
          kind: 'walletobjects#uri',
          uri: 'https://issuer-website.com',
          description: 'Website'
        },
        {
          kind: 'walletobjects#uri',
          uri: 'https://www.facebook.com/issuer-fb',
          description: 'Facebook'
        }
      ]
    },
    hexBackgroundColor: '#f8a400'
  }
}

Update a card template

[PUT] /google-pay/offer/cardTemplate

Request (body)

{
  cardTemplate: {
    hexBackgroundColor: String,
    description: String,
    heroImage: String,
    id: String,
    logoUrl: String,
    message: String,
    title: String
  },
  issuer: {
    description: String,
    email: String,
    facebook: String,
    id: String,
    location: String,
    name: String,
    phone: String,
    website: String,
  }
}

Response

{
  data: OfferClass
}

Sample Request

{
  cardTemplate: {
    hexBackgroundColor: '#f8a400',
    description: 'Updated Card description',
    heroImage: 'https://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg',
    id: 'ct789904366304',
    logoUrl: 'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
    message: 'Campaign message here',
    title: 'Discount 12%'
  },
  issuer: {
    description: 'Issuer description',
    email: '[email protected]',
    facebook: 'https://www.facebook.com/issuer-fb',
    id: '<ISSUER_ID>',
    location: 'Address here',
    name: 'Issuer name',
    phone: '1234567890',
    website: 'https://issuer-website.com',
  }
}

Sample Response

{
  data: {
    kind: 'walletobjects#offerClass',
    title: 'Discount 12%',
    redemptionChannel: 'online',
    provider: 'Provider name',
    titleImage: {
      kind: 'walletobjects#image',
      sourceUri: {
        uri:
          'https://cdn.thedesigninspiration.com/wp-content/uploads/2018/01/star4.jpg',
        description: 'Card logo'
      }
    },
    details: 'Updated Card description',
    id: '<ISSUER_ID>.ct789904366304',
    version: '1',
    issuerName: 'Issuer name',
    messages: [
      {
        kind: 'walletobjects#walletObjectMessage',
        header: 'Campaign message',
        body: 'Campaign message here'
      }
    ],
    reviewStatus: 'approved',
    textModulesData: [
      {
        header: 'Location',
        body: 'Address here'
      },
      {
        header: 'About',
        body: 'Issuer description'
      }
    ],
    linksModuleData: {
      uris: [
        {
          kind: 'walletobjects#uri',
          uri: '1234567890',
          description: 'Phone'
        },
        {
          kind: 'walletobjects#uri',
          uri: '[email protected]',
          description: 'Email'
        },
        {
          kind: 'walletobjects#uri',
          uri: 'https://issuer-website.com',
          description: 'Website'
        },
        {
          kind: 'walletobjects#uri',
          uri: 'https://www.facebook.com/issuer-fb',
          description: 'Facebook'
        }
      ]
    },
    hexBackgroundColor: '#f8a400'
  }
}

Get an issuer

[GET] /google-pay/offer/issuer

Request (params)

{
  issuer: {
    id: String
  }
}

Response

{
  data: {
    contactInfo: {
      email: String,
      name: String,
      phone: String
    },
    issuerId: String,
    homepageUrl: String,
    name: String
  }
}

Sample Request

{
  issuer: {
    id: '3354596808215418082'
  }
}

Sample Response

{
  data: {
    issuerId: "<ISSUER_ID>",
    name: "<MERCHANT_NAME>",
    contactInfo: {
      name: "<MANAGER_NAME>",
      phone: "<MANAGER_PHONE>",
      email: "<MANAGER_EMAIL>"
    },
    homepageUrl: "<WEBSITE>"
  }
}

Create an issuer

[POST] /google-pay/offer/issuer

Request (body)

{
  contactInfo: {
    email: String,
    name: String,
    phone: String
  },
  homepageUrl: String,
  name: String,
}

Response

{
  data: {
    contactInfo: {
      email: String,
      name: String,
      phone: String
    },
    homepageUrl: String,
    issuerId: String,
    name: String,
  }
}

Sample Request

{
  name: "Test 1",
  contactInfo: {
    name: "Manager name 1",
    phone: "AE56780600732",
    email: " [email protected]"
  },
  homepageUrl: "http://my-business-website.com"
}

Sample Response

{
  issuerId: "<ISSUER_ID>",
  name: "<MERCHANT_NAME>",
  contactInfo: {
    name: "<MANAGER_NAME>",
    phone: "<MANAGER_PHONE>",
    email: "<MANAGER_EMAIL>"
  },
  homepageUrl: "<WEBSITE>"
}

Update an issuer

[PUT] /google-pay/offer/issuer

Request (body)

{
  contactInfo: {
    email: String,
    name: String,
    phone: String
  },
  homepageUrl: String,
  issuerId: String,
  name: String,
}

Response

{
  data: {
    contactInfo: {
      email: String,
      name: String,
      phone: String
    },
    homepageUrl: String,
    issuerId: String,
    name: String,
  }
}

Sample Request

{
  issuerId: "<ISSUER_ID>",
  name: "<MERCHANT_NAME>",
  contactInfo: {
    name: "<MANAGER_NAME>",
    phone: "<MANAGER_PHONE>",
    email: "<MANAGER_EMAIL>"
  },
  homepageUrl: "<WEBSITE>"
}

Sample Response

{
  issuerId: "<ISSUER_ID>",
  name: "<MERCHANT_NAME>",
  contactInfo: {
    name: "<MANAGER_NAME>",
    phone: "<MANAGER_PHONE>",
    email: "<MANAGER_EMAIL>"
  },
  homepageUrl: "<WEBSITE>"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published