List of Features

Gopay tokenization SDK allows you to do the following:

  1. Account linking - This feature links a user’s gopay account to your merchant ID.
  2. Account status inquiry - This feature enquires about the status of a linked account. You’ll get the linking status, and if the account is linked, this feature will also provide the available Gopay payment options along with the balance and the token required to create transactions.
  3. Create transactions - This feature creates transactions using the user’s token.
  4. Disable account - This feature unlinks the account and disables the use of the user token.
  5. API response processor - This feature simplifies the processing of use-cases that need further processing via Web in account linking and transaction API.

1. Account Linking

In order to be able to generate the token for transaction purposes, users need to link their wallet.

Account linking is the process for users to link their Gopay account to your merchant account. The result is a token used for:

  • account status inquiry
  • create a transaction
  • disable an account

The overview of account linking is seen in this flow


To do account linking, you need to provide the GoPayPartnerDetails object that consisted of the following parameters:

PHONE_NUMBERPhone number string without country code and without leading 0 with a minimum length of 9 characters maximum of 12 characters. Please refer to E.164 standard for this
COUNTRY_CODECountry code string without the + sign with a minimum length of 1 character and a maximum of 3 characters. Please refer to the E.164 standard. For Indonesian merchants, please use 62 as the value

Optional metadata object can be provided if necessary.

2. Account Status Enquiry

The account status inquiry is used before creating transactions. The API is required for the following purposes:

  • Checking the account linking status
  • Getting available payment options
  • Getting the balance of each available payment option

Currently, we support Gopay Wallet and Gopay Paylater for account status, but this will be dynamically added or reduced. Please do not hardcode the types and rely on the resulting payment options.

The overview of the account status inquiry is seen in this flow.


The parameter that you need for this API is the account_id, which you get from the response from the account linking API.

The API will result in account information where you will get the linking status, list of available payment options. The payment options have the balance information and the payment option token that you need to create transactions.

3. Create Transaction

The overview for creating transactions is shown in this flow.


Created transactions are idempotent by nature. If you send the same transaction object, it will only check the same transaction on the server and return the same object without creating a new one.

The create transaction API is used to perform transactions from an already linked account. You need the following parameters to create transactions:

GoPayDetailsAn object that contains account_id and payment_option_token from the account status inquiry process
TransactionDetailsAn object that contains the gross_amount and currency
ItemsThis is a list of ItemDetail objects that specifies the items involved in the transaction. The information is item_id, name, price, quantity, and category. This is an optional parameter and can be set to null if not used

Optional metadata object can be provided if necessary.

4. Disable Account

The API will stop the linking of user accounts from your merchant ID, and for making the payment option tokens unable to be used again. If the user needs to create transactions, the user account needs to be linked again.

The overview for disabling an account is shown in this flow.


The parameter that you need for this API is the account_id, which you get from the result of the account linking API.
Optional metadata object can be provided if necessary.