---
title: "Create Payment Configuration"
method: POST
path: "/v2/payments/configuration"
tags: ["WhatsApp Payments"]
---

# Create Payment Configuration

`POST /v2/payments/configuration`

## Request

- Base URL: `https://cpaaswa.netcorecloud.net/api`
- URL: `https://cpaaswa.netcorecloud.net/api/v2/payments/configuration`
- Auth: HTTP bearer

Create a new payment gateway configuration for WhatsApp payments. This endpoint allows businesses to 
set up payment providers (such as PayU, RazorPay, etc.) with OAuth-based authentication and 
required merchant details for processing payments through WhatsApp.

## Headers

- `Content-Type` 'application/json', required

## Request body

- object: Request payload for creating a payment gateway configuration
  - `configuration_name` string, required: Unique name for the payment configuration. This identifier will be used to reference the configuration in payment operations.
  - `provider_name` string, required: Name of the payment gateway provider (e.g., PayU, RazorPay, etc.)
  - `redirect_url` string, uri: The callback URL where users will be redirected after completing OAuth authentication with the payment provider. Must be a valid HTTPS URL.
  - `merchant_category_code` string, required: Merchant Category Code (MCC) for the business. Used to classify the type of business and transactions.
  - `purpose_code` string, required: Purpose code indicating the nature of the payment transaction as per regulatory requirements.
  - `merchant_vpa` string: Merchant VPA for UPI payments.

## Response `200`

Payment configuration created successfully

- object: Response containing payment configuration information
  - `status` string, required: Overall status of the API call
  - `message` string, required: Human-readable message about the operation
  - `data` object, required: Payment configuration data details
    - `configuration_name` string, required: The configuration name used in the request
    - `provider_name` string, required: Name of the payment gateway provider
    - `redirect_url` string, uri, required: The redirect URL configured for OAuth callback
    - `merchant_category_code` string, required: Merchant Category Code configured for the payment gateway
    - `purpose_code` string, required: Purpose code configured for the payment gateway
    - `status` 'active' | 'pending' | 'inactive', required: Current status of the payment configuration

## Other responses

- `400`: The request is invalid or malformed.
- `4XX`: A generic error occurred while processing the request.

---

[API](https://skmtc.dev/netcorecloud/apis/whatsapp-api.md) - [All operations](https://skmtc.dev/netcorecloud/apis/whatsapp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/netcorecloud/apis/whatsapp-api/revisions/82cdf689fb7a?raw)
