post
https://partner.gupshup.io/partner/bizgate/app//payment/configuration
Creates a new payment configuration on the app so WhatsApp Pay can be offered through the supplied provider.
Request parameters
Path parameters
| Key | Description | Values | Data Type | Required/Optional |
|---|---|---|---|---|
| appId | Identifier of the WhatsApp app the call acts on. | 6f414190-d45c-4671-bca1-fb6c3018cb13 | String | Required |
Body
| Key | Description | Values | Data Type | Required/Optional |
|---|---|---|---|---|
| configuration_name | Name for this configuration, used to reference it on the payment and refund endpoints. Unique within the app. | payment_config_1 | — | Required |
| purpose_code | Why the payment is being collected, as classified by the provider. | PURCHASE | — | Optional |
| merchant_category_code | Merchant Category Code — the four-digit ISO 18245 code for the merchant's line of business (5411 is grocery stores and supermarkets). | 5411 | — | Optional |
| provider_name | Payment provider this configuration routes through. | UPI | — | Required |
| redirect_url | URL the payer is returned to once the payment completes or is abandoned. | https://merchant.com/callback | — | Optional |
| merchant_vpa | Merchant'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
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…