Skip to content

Payment Gateway

Users can be redirected to handle the payment process in a simple manner, similar to their interaction with traditional payment gateways. The Payment Gateway (PGW) always utilizes the latest version of the Payments API and has a neutral design.

Note

For the sake of simplicity, we shall assume that the payment gateway base URL is https://paymentgw.com/

The payment gateway can be used for both payments and for withdrawals of funds, and both for crypto and fiat. Since flows differ slightly, details are provided separately below.

For flows involving the Onboarding wallet, extra parameters are available to further facilitate UX. More information here.

Payments with Crypto

Payments in crypto are specified by including the /payment/crypto string in the redirect. Below we specify the rest of mandatory and optional parameters.

Mandatory parameters

  • web3Address: the public web3 address that will be required to sign the transaction.
  • buynowId: identifier of the purchase.
  • redirectUrl64: url where the user will be redirected after leaving the PGW. It must be encoded in Base64.

Optional Parameters

Aimed at enhancing the user experience, the following parameters can also be added using standard URL query string syntax:

  • ?l={lang}: sets the default language of the payment gateway. Supported languages: English (US) en, and Spanish (Spain) es.

  • ?wallet={wallet}: preselects the wallet that will be used to sign the transaction. Supported values: metaMask, walletConnect, and onboardingWallet.

The following summarizes how to build the URL with the parameters described so far:

https://paymentgw.com/payment/crypto/:web3Address/:buynowId/:redirectUrl64?l={lang}&wallet={wallet}

Payments with Fiat

Payments in fiat are specified by including the /payment/fiat string in the redirect. Below we specify the rest of mandatory and optional parameters.

Mandatory parameters

  • web3Address: the public web3 address that will be required to sign the transaction.
  • buynowId: identifier of the purchase.
  • redirectUrl64: url where the user will be redirected after leaving the PGW. It must be encoded in Base64.

Optional Parameters

Aimed at enhancing the user experience, the following parameters can also be added using standard URL query string syntax:

  • ?l={lang}: sets the default language of the payment gateway. Supported languages: English (US) en, and Spanish (Spain) es.

  • ?wallet={wallet}: preselects the wallet that will be used to sign the transaction. Supported values: metaMask, walletConnect, and onboardingWallet.

The following summarizes how to build the URL with the parameters described so far:

https://paymentgw.com/payment/fiat/:web3Address/:buynowId/:redirectUrl64?l={lang}&wallet={wallet}

Withdrawals with Crypto

Withdrawals in crypto are specified by including the /withdraw/crypto string in the redirect. Below we specify the rest of mandatory and optional parameters.

Mandatory parameters:

  • web3Address: the public web3 address that will be required to sign the transaction.
  • redirectUrl64: url where the user will be redirected after leaving the PGW. It must be encoded in Base64.

Optional Parameters

Aimed at enhancing the user experience, the following parameters can also be added using standard URL query string syntax:

  • ?l={lang}: sets the default language of the payment gateway. Supported languages: English (US) en, and Spanish (Spain) es.

  • ?wallet={wallet}: preselects the wallet that will be used to sign the transaction. Supported values: metaMask, walletConnect, and onboardingWallet.

  • ?buyNowId={id}: used to display withdrawal options for one single traded asset. If not specified, all pending withdrawals in crypto will be displayed to the user, as shown in the following screenshot:

List of available buyNowIds

The following summarizes how to build the URL with the parameters described so far:

https://paymentgw.com/withdraw/crypto/:web3Address/:redirectUrl64?l={lang}&wallet={wallet}&buyNowId={id}

Withdrawals with Fiat

Withdrawals in fiat are specified by including the /withdraw/fiat string in the redirect. Below we specify the rest of mandatory and optional parameters.

Mandatory parameters:

  • web3Address: the public web3 address that will be required to sign the transaction.
  • redirectUrl64: url where the user will be redirected after leaving the PGW. It must be encoded in Base64.

Optional Parameters

Aimed at enhancing the user experience, the following parameters can also be added using standard URL query string syntax:

  • ?l={lang}: sets the default language of the payment gateway. Supported languages: English (US) en, and Spanish (Spain) es.

  • ?wallet={wallet}: preselects the wallet that will be used to sign the transaction. Supported values: metaMask, walletConnect, and onboardingWallet.

The following summarizes how to build the URL with the parameters described so far:

https://paymentgw.com/withdraw/fiat/:web3Address/:redirectUrl64?l={lang}&wallet={wallet}