Client-Side Implementation Steps

  1. Initialise Payment

    • Get Product Bundle Ids from the Pay1st Admin Console. These are for the bundles created for each purchase bundle that is created.
    • Set up a successful callback URL for the product from the Pay1st Admin Console. This will be called when a payment is successful as mentioned in section here.
    • Set up a failure callback URL for the product from Pay1st Admin Console. This will be called when a payment has failed as mentioned in section here.
    • When a user selects a bundle, redirect to the platform purchase endpoint with the following params:
    ParamFormatDescription
    usernameStringThe user identity. This should be a unique identifier used to identify the user in the game.
    platformString {AND, IOS, WEB}The mobile platform is used to load the Platform. Use WEB for payments from web applications.
    productBundleIdLongThe bundle identifier as configured in Platform
    countryCodeStringThe ISO 2 country code, e.g. ZA
    externalReferenceString (Optional)Your own reference that you would want to use for reconciliation. It will be sent back in the summary webhook.
    amountDecimal (Optional)The amount to pay.
    currencyCodeString (Optional)The currency code for the amount.
    partnerSourceStringThe source that identifies the partner.
    quantityDecimalThe quantity of product bundle being bought
    isPay1stBooleanThe value of this attribute should be set to 'true'
    channelIdLongThe id of the payment method
    isHeadlessBooleanThe value of this attribute should be set to 'true'

    URL params:

    https://<payments_url>/payment?username=<USERNAME>&platform=<PLATFORM>&productBundleId=<PRODUCT_BUNDLE_ID>&countryCode=<COUNTRY_CODE>&externalReference=<EXTERNAL_REFERENCE>&amount=<AMOUNT>&currencyCode=<CURRENCY_CODE>&headless=<TRUE>&partnerSource=<PARTNER_SOURCE>&quantity=<QUANTITY>&isPay1st=<TRUE>&channelId=<PAYMENT_METHOD_ID>