GET /<WHATSAPP_BUSINESS_ACCOUNT_ID>/payment_configurations
curl 'https://graph.facebook.com/v16.0/102290129340398/payment_configurations' \ -H 'Authorization: Bearer EAAJB...'
{ "data": [ { "payment_configurations": [ { "configuration_name": "test-payment-configuration", "merchant_category_code": { "code": "0000", "description": "Test MCC Code" }, "purpose_code": { "code": "00", "description": "Test Purpose Code" }, "status": "Active", "provider_mid": "test-payment-gateway-mid", "provider_name": "RazorPay", "created_timestamp": 1720203204, "updated_timestamp": 1721088316 }, .... ] } ] }
| Field | Description |
|---|---|
configuration_namestring | Required. The name of the payment configuration to be used in the Order Details message. |
merchant_category_codeobject | Required. Merchant Category Code: code string
description string
|
purpose_codeobject | Required. Purpose Code: code string
description string
|
statusstring | Required. Status of the payment configuration. Must be one of [“Active”, “Needs_Connecting”, “Needs_Testing”]. |
provider_midstring | Optional. Payment Gateway Merchant Identification Number (MID). |
provider_namestring | Optional. Payment Gateway Name. Must be one of [“razorpay”, “payu”, “zaakpay”]. |
merchant_vpastring | Optional. Merchant UPI handle. |
created_timestampinteger | Optional. Time when payment configuration was created. |
updated_timestampinteger | Optional. Time when payment configuration was last updated. |
GET /<WHATSAPP_BUSINESS_ACCOUNT_ID>/payment_configuration/<CONFIGURATION_NAME>
curl 'https://graph.facebook.com/v16.0/102290129340398/payment_configuration/test-payment-configuration' \ -H 'Authorization: Bearer EAAJB...'
{ "data": [ { "configuration_name": "test-payment-configuration", "merchant_category_code": { "code": "0000", "description": "Test MCC Code" }, "purpose_code": { "code": "00", "description": "Test Purpose Code" }, "status": "Active", "provider_mid": "test-payment-gateway-mid", "provider_name": "RazorPay", "created_timestamp": 1720203204, "updated_timestamp": 1721088316 } ] }
| Field | Description |
|---|---|
configuration_namestring | Required. The name of the payment configuration to be used in the Order Details message. |
merchant_category_codeobject | Required. Merchant Category Code: code string
description string
|
purpose_codeobject | Required. Purpose Code: code string
description string
|
statusstring | Required. Status of the payment configuration. Must be one of [“Active”, “Needs_Connecting”, “Needs_Testing”]. |
provider_midstring | Optional. Payment Gateway Merchant Identification Number (MID). |
provider_namestring | Optional. Payment Gateway Name. Must be one of [“razorpay”, “payu”, “zaakpay”]. |
merchant_vpastring | Optional. Merchant UPI handle. |
created_timestampinteger | Optional. Time when payment configuration was created. |
updated_timestampinteger | Optional. Time when payment configuration was last updated. |
POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>/payment_configuration
curl -X POST \ 'https://graph.facebook.com/v15.0/102290129340398/payment_configuration' \ -H 'Authorization: Bearer EAAJB...' \ -H 'Content-Type: application/json' \ -d '{ "configuration_name": "test-payment-configuration", "purpose_code": "00", "merchant_category_code": "0000", "provider_name": "razorpay", "redirect_url": "https://test-redirect-url.com" }'
curl -X POST \ 'https://graph.facebook.com/v15.0/102290129340398/payment_configuration' \ -H 'Authorization: Bearer EAAJB...' \ -H 'Content-Type: application/json' \ -d '{ "configuration_name": "test-payment-configuration", "purpose_code": "00", "merchant_category_code": "0000", "provider_name": "upi_vpa", "merchant_vpa": "test-upi-merchant-vpa@test" }'
| Field | Description |
|---|---|
configuration_namestring | Required. The name of the payment configuration to be used in the Order Details message. |
merchant_category_codestring | Optional. Merchant Category Code. |
purpose_codeobject | Optional. Purpose Code. |
provider_namestring | Required. Provider name of the payment configuration. Must be one of [“upi_vpa”, “razorpay”, “payu”, “zaakpay”]. |
merchant_vpastring | Optional. Merchant UPI handle. |
redirect_urlURI | Optional. The url which merchant will be redirected to after successfully linking a payment configuration. |
{ "oauth_url": "https://www.facebook.com/payment/onboarding/init/", "expiration": 1721687287, "success": true }
{ "success": true }
| Field | Description |
|---|---|
oauth_urlstring | Optional. OAuth url to be used to link payment configuration to the payment gateway |
expirationinteger | Optional. Expiration time of the OAuth url. |
successboolean | Required. Boolean flag to denote if payment configuration creation was successful or not. |
POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>/payment_configuration/<CONFIGURATION_NAME>
curl -X POST \ 'https://graph.facebook.com/v15.0/102290129340398/payment_configuration/test-payment-configuration' \ -H 'Authorization: Bearer EAAJB...' \ -H 'Content-Type: application/json' \ -d '{ "data_endpoint_url": "https://test-data-endpoint-url.com" }'
| Field | Description |
|---|---|
data-endpoint-urlURI | Optional. The URL endpoint that the WhatsApp client sends a secure HTTPS request to for data exchange purposes in Checkout Button Templates offering. |
POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>/generate_payment_configuration_oauth_link
curl -X POST \ 'https://graph.facebook.com/v15.0/102290129340398/generate_payment_configuration_oauth_link' \ -H 'Authorization: Bearer EAAJB...' \ -H 'Content-Type: application/json' \ -d '{ "configuration_name": "test-payment-configuration", "redirect_url": "https://test-redirect-url.com" }'
| Field | Description |
|---|---|
configuration_namestring | Required. The name of the payment configuration to be used in the Order Details message. |
redirect_urlURI | Optional. The url which merchant will be redirected to after successfully linking a payment configuration. |
{ "oauth_url": "https://www.facebook.com/payment/onboarding/init/", "expiration": 1721687287 }
| Field | Description |
|---|---|
oauth_urlstring | Optional. OAuth url to be used to link payment configuration to the payment gateway |
expirationinteger | Optional. Expiration time of the OAuth url. |
DELETE /<WHATSAPP_BUSINESS_ACCOUNT_ID>/payment_configuration
| Field | Description |
|---|---|
configuration_namestring | Required. The name of the payment configuration to be used in the Order Details message. |
curl -X DELETE \ 'https://graph.facebook.com/v15.0/102290129340398/payment_configuration' \ -H 'Authorization: Bearer EAAJB...' \ -H 'Content-Type: application/json' \ -d '{ "configuration_name": "test-payment-configuration" }'
{ "success": true }
| Field | Description |
|---|---|
successboolean | Required. Boolean flag to denote if payment configuration removal was successful or not. |
| Field | Description |
|---|---|
configuration_namestring | Required. The name of the payment configuration to be used in the Order Details message. |
provider_namestring | Required. Provider name of the payment configuration. Must be one of [“razorpay”, “payu”, “zaakpay”]. |
provider_midstring | Required. Payment gateway account merchant ID. |
statusstring | Required. Status of the payment configuration. Must be one of [“Active”, “Needs_Connecting”, “Needs_Testing”]. |
created_timestampinteger | Required. Time when payment configuration was created. |
updated_timestampinteger | Required. Time when payment configuration was last updated. |
{ "entry": [ { "id": "0", "time": 1725499886, "changes": [ { "field": "payment_configuration_update", "value": { "configuration_name": "test-payment-configuration", "provider_name": "razorpay", "provider_mid": "test-provider-mid", "status": "Needs Testing", "created_timestamp": 123457678, "updated_timestamp": 123457678 } } ] } ], "object": "whatsapp_business_account" }
{ "error": { "message": "(#131005) Access denied", "type": "OAuthException", "code": 131005, "error_data": { "messaging_product": "whatsapp", "details": "WhatsApp Payments Terms of Service acceptance pending for this WhatsApp Business Account. Please use the following link to accept terms of service before using Business APIs: https://fb.me/12345" } } }