Create Payment Page

This API allows partners to create a payment page for a given merchant ID, which allows the payer to pay by clicking on the URL using card or ACH.

POST https://<Platform-host>/api/payment-page

Request

Request Body

Name
Type
Description

merchant_id*

string

Merchant ID

name*

string

Name for the payment page

organization_logo

file

Image data for the organization's logo to display on the payment page

payment_page_header

string

Title for the payment page

background_image

file

Image data for the background in the payment page

description

string

Description of payment page

use_custom_field

boolean

True | False.

  • True: The payment page will have the custom string field

field_name

string

The name of the custom field. This is required if useCustomField is true

mandatory

boolean

True | False. If true, the custom field will be mandatory

completion_type

string

Values - message | redirect Message - means user will be displayed a message after successful transaction redirect - means the user will be redirected to the provided URL

success_message

string

If completionType is message, then this is required and this is the success message that will be displayed after the successful transaction

redirect_url

string

If completionType is redirect, then this field is required. This is the URL where the user will be redirected to, after a successful transaction

start_date

string

Payment page will be active starting this date. If not provided the payment page will activate immediately.

end_date

string

Payment page will become INACTIVE after this date. If not provided the payment page will remain ACTIVE until cancelled.

payment_methods

array

Accepted values - CC_DC, ACH This field determine what payment methods option will be displayed to the user while paying. Default will be both values. CC_DC - stands for Credit Card and Debit Card ACH - Bank transfer

save_card_consent

boolean

True | False.

  • True - Display the field to get user's consent to use the same payment details for future payments

metadata

object

Add any additional metadata by passing a json object

contact_info

boolean

True | False.

  • True: The contact info section will be displayed in the payment page

show_first_name

boolean

True | False. If true, display first name field in the contact Info

mandatory_first_name

boolean

True | False. If true, the first name field will be mandatory in the payment page

show_last_name

boolean

True | False. If true, display last name field in the contact Info

mandatory_last_name

boolean

True | False. If true, the last name field will be mandatory in the payment page

show_business_name

boolean

True | False. If true, display business name field in the contact Info

mandatory_business_name

boolean

True | False. If true, the business name field will be mandatory in the payment page

show_phone_number

boolean

True | False. If true, display phone number field in the contact Info

mandatory_phone_number

boolean

True | False. If true, the phone number field will be mandatory in the payment page

show_email_address

boolean

True | False. If true, display email address field in the contact Info

mandatory_email_address

boolean

True | False. If true, the email address field will be mandatory in the payment page

show_address

boolean

True | False. If true, display address field in the contact Info

mandatory_address

boolean

True | False. If true, the address field will be mandatory in the payment page

button_text

string

Name of the button in the payment page. Default will be "Pay Now"

terms_and_conditions

string

Terms and Conditions string that will be displayed in the payment page

terms_and_conditions_text_color

string

HEX code for the text color for the terms and conditions string

internal_transaction_id

string

An internal ID from integrating system. Will be returned in the response

slug_id

string

Slug text for the generated payment page URL. By default, it is auto-generated. This slug text has to be unique in Platform environment

Response Body

Name
Type
Description
Required

payment_link_id

string

Platform system ID for the Payment page

Required

payment_link_status

string

ACTIVE, INACTIVE, COMPLETED, CANCELLED

Required

payment_link_url

string

Payment Link URL

Required

qr_code_url

string

Payment Link QR Code URL

Required

merchant_id

string

Merchant ID

Required

name

string

Name for the payment page

Required

organization_logo

file

OrganizationLogo provided in the request

Optional

payment_page_header

string

Title for the payment page

Optional

background_image

file

Background image provided in the request

Optional

description

string

Description of payment page

Optional

use_custom_field

string

True | False. True if the payment page will have the custom string field

Optional

custom_fields.custom_field_name

string

The name of the custom field. This is required if useCustomField is true

Optional

custom_fields.mandatory

boolean

True | False. If true, the custom field will be mandatory

Optional

completion_type

string

Values - message | redirect Message - means user will be displayed a message after successful transaction redirect - means the user will be redirected to the provided URL

Required

success_message

string

If completionType is message, then this is required and this is the success message that will be displayed after the successful transaction

Optional

redirect_url

string

If completionType is redirect, then this field is required. This is the URL where the user will be redirected to, after a successful transaction

Optional

start_date

string

Payment page will be active starting this date. If not provided the payment page will activate immediately.

Optional

end_date

string

Payment page will become INACTIVE after this date. If not provided the payment page will remain ACTIVE until cancelled.

Optional

payment_methods

array

Accepted values - CC_DC, ACH

This field determine what payment methods option will be displayed to the user while paying. Default will be both values. CC_DC - stands for Credit Card and Debit Card ACH - Bank transfer

Optional

save_card_consent

boolean

True | False.

  • True - Display the field to get user's consent to use the same payment details for future payments

Optional

metadata

object

Add any additional metadata by passing a json object

Optional

contact_info

boolean

True | False. True if the contact info section will be displayed in the payment page

Optional

contact_info_details.show_first_name

boolean

True | False. If true, display first name field in the contact Info

Optional

contact_info_details.mandatory_first_name

boolean

True | False. If true, the first name field will be mandatory in the payment page

Optional

contact_info_details.show_last_name

boolean

True | False. If true, display last name field in the contact Info

Optional

contact_info_details.mandatory_last_name

boolean

True | False. If true, the last name field will be mandatory in the payment page

Optional

contact_info_details.show_business_name

boolean

True | False. If true, display business name field in the contact Info

Optional

contact_info_details.mandatory_business_name

boolean

True | False. If true, the business name field will be mandatory in the payment page

Optional

contact_info_details.show_phone_number

boolean

True | False. If true, display phone number field in the contact Info

Optional

contact_info_details.mandatory_phone_number

boolean

True | False. If true, the phone number field will be mandatory in the payment page

Optional

contact_info_details.show_email_address

boolean

True | False. If true, display email address field in the contact Info

Optional

contact_info_details.mandatory_email_address

boolean

True | False. If true, the email address field will be mandatory in the payment page

Optional

contact_info_details.show_address

boolean

True | False. If true, display address field in the contact Info

Optional

contact_info_details.mandatory_address

boolean

True | False. If true, the address field will be mandatory in the payment page

Optional

button_text

string

Name of the button in the payment page. Default will be "Pay Now"

Optional

terms_and_conditions

string

Terms and Conditions string that will be displayed in the payment page

Optional

terms_and_conditions_text_color

string

HEX code for the text color for the terms and conditions string

Optional

internal_transaction_id

string

An internal ID from integrating system. Will be returned in the response. Note: This ID won't be displayed in the payment page

Optional

slug_id

string

Slug text for the generated payment page URL. By default, it is auto-generated. This slug text has to be unique in Platform environment

Optional

{
  "name": "Sample Name",
  "merchant_id": "de08485d-9a4f-44ff-9ed2-ad6e354e382d",
  "organization_logo": "[FILE]",
  "payment_page_header": "Sample Header",
  "background_image": "[FILE]",
  "description": "Sample Description",
  "use_custom_field": "true",
  "field_name": "Sample Custom Field",
  "mandatory": "true",
  "completion_type": "message",
  "success_message": "Success Message Sample",
  "redirect_url": "",
  "start_date": "2024-10-28T20:18:00.000Z",
  "end_date": "2024-11-07T20:20:00.000Z",
  "currency_code": "USD",
  "payment_methods": "CC_DC,ACH",
  "save_card_consent": "false",
  "contact_info": "true",
  "show_first_name": "true",
  "mandatory_first_name": "true",
  "show_last_name": "true",
  "mandatory_last_name": "false",
  "show_business_name": "true",
  "mandatory_business_name": "true",
  "show_phone_number": "true",
  "mandatory_phone_number": "true".
  "show_email_address": "true",
  "mandatory_email_address": "true",
  "show_address": "true",
  "mandatory_address": "true"
  "button_text": "Sample Button Text",
  "terms_and_conditions": "Sample Terms and Conditions",
  "terms_and_conditions_text_color": "#481414",
  "internal_transaction_id": "123",
  "slug_id": "slugIdSample"
}

Webhook event: PAYMENTPAGE_CREATED

Webhook Payload Example

{
  event_uid: '4d304a4ed5a4e338b4753ab832efd9c0',
  event: 'PAYMENTPAGE_CREATED',
  data: {
    "id": "qd8he",
    "merchant_id": "de08485d-9a4f-44ff-9ed2-ad6e354e382d",
    "payment_page_id": "myoyu",
    "payment_page_status": "ACTIVE",
    "payment_url": "<payment link url>",
    "qr_code_url": "<qr code url>",
    "name": "Test",
    "organization_logo": {
      "1725618113.bg-image.avif": {
        "bucket": "pf-sandbox-staging-payment-link-assets",
        "key": "payment-link-assets/1730151647.1725618113.bg-image.avif",
        "location": <URL>
      }
    },
    "payment_page_header": "Header",
    "background_image": {
      "1.png": {
        "bucket": "pf-sandbox-staging-payment-link-assets",
        "key": "payment-link-assets/1730151649.1.png",
        "location": <URL>
      }
    },
    "description": "Product",
    "use_custom_field": true,
    "custom_fields": {
      "custom_field_name": "Field",
      "mandatory": "true"
    },
    "completion_type": "message",
    "success_message": "Success",
    "redirect_url": "",
    "start_date": "2024-10-28T21:39:00.000Z",
    "end_date": "2024-11-06T21:40:00.000Z",
    "payment_methods": ["CC_DC", "ACH"],
    "save_card_consent": true,
    "is_cancelled": false,
    "metadata": null
    "contact_info": true,
    "contact_info_details": {
      "show_first_name": "true",
      "mandatory_first_name": "true",
      "show_last_name": "true",
      "mandatory_last_name": "true",
      "show_phone_number": "true",
      "mandatory_phone_number": "true",
      "show_email_address": "true",
      "mandatory_email_address": "true",
      "show_address": "true",
      "mandatory_address": "true",
      "show_business_name": "true"
    },
    "button_text": "Button",
    "terms_and_conditions": "Terms",
    "terms_and_conditions_text_color": "#470b0b",
    "slug_id": "slug"
  }
}

Last updated