Create payment configuration

Creates a new payment configuration on the app so WhatsApp Pay can be offered through the supplied provider.

Request parameters

Path parameters

KeyDescriptionValuesData TypeRequired/Optional
appIdIdentifier of the WhatsApp app the call acts on.6f414190-d45c-4671-bca1-fb6c3018cb13StringRequired

Body

KeyDescriptionValuesData TypeRequired/Optional
configuration_nameName for this configuration, used to reference it on the payment and refund endpoints. Unique within the app.payment_config_1—Required
purpose_codeWhy the payment is being collected, as classified by the provider.PURCHASE—Optional
merchant_category_codeMerchant Category Code — the four-digit ISO 18245 code for the merchant's line of business (5411 is grocery stores and supermarkets).5411—Optional
provider_namePayment provider this configuration routes through.UPI—Required
redirect_urlURL the payer is returned to once the payment completes or is abandoned.https://merchant.com/callback—Optional
merchant_vpaMerchant's Virtual Payment Address, the UPI handle funds are collected into.merchant@upi—Optional

Sample cURL — Create payment configuration.

curl --request POST \
  --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/payment/configuration' \
  --header 'Authorization: Bearer <UT>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "configuration_name" : "payment_config_1",
  "purpose_code" : "PURCHASE",
  "merchant_category_code" : 5411,
  "provider_name" : "UPI",
  "redirect_url" : "https://merchant.com/callback",
  "merchant_vpa" : "merchant@upi"
}'

Sample success response (200)

{
  "status": "success",
  "data": {
    "oauth_url": "https://www.facebook.com/payment/onboarding/init/",
    "expiration": 1721687287,
    "success": true
  }
}
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Identifier of the WhatsApp app the call acts on.

Body Params

Create a payment configuration on an app

string
required

Name for this configuration, used to reference it on the payment and refund endpoints. Unique within the app.

string

Why the payment is being collected, as classified by the provider.

string

Merchant Category Code — the four-digit ISO 18245 code for the merchant's line of business (5411 is grocery stores and supermarkets).

string
required

Payment provider this configuration routes through.

string

URL the payer is returned to once the payment completes or is abandoned.

string

Merchant's Virtual Payment Address, the UPI handle funds are collected into.

Responses

Language
Credentials
Bearer
Universal Token (UT)
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json