WhatsApp Payments

Generate OAuth Link for Payment Configuration

Generate an OAuth link for payment gateway configuration. This endpoint creates an authorization URL that redirects to the payment gateway's OAuth flow, allowing businesses to connect their payment accounts and configure payment settings.

post/v2/payments/configuration/oauth_link

Parameters

#/paths/~1v2~1payments~1configuration/post/parameters/0 — unresolved $ref

Request body

configuration_namestring required

Unique name for the payment configuration. This will be used to identify and manage the payment gateway setup.

redirect_urlstring uri required

The URL where users will be redirected after completing the OAuth authorization flow. This must be a valid HTTPS URL registered with the payment gateway.

Example request

{
  "configuration_name": "ravi",
  "redirect_url": "https://example.pepipostravi.com/oauth"
}

Response

OAuth link generated successfully

statusstring required

Overall status of the API call

messagestring required

Human-readable message about the operation

Example response

{
  "status": "success",
  "message": "OAuth link generated successfully",
  "data": {
    "oauth_url": "https://oauth.payment.gateway.com/authorize?client_id=xxx&redirect_uri=https://example.pepipostravi.com/oauth&response_type=code&state=xxx",
    "configuration_name": "ravi"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.