2C2P Payment Token API

Initialize a payment and obtain a paymentToken.

Documentation

Specifications

Other Resources

OpenAPI Specification

2c2p-payment-token-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: 2C2P Payment Gateway API (PGW v4.3) Do Payment Payment Token API
  description: 'Server-to-server REST interface for the 2C2P Payment Gateway. Every operation is an HTTPS POST under /payment/4.3/. IMPORTANT: on the wire, each request and response body is a single JSON Web Token (JWS) signed with the merchant''s Secret Key using HMAC SHA-256 - the merchant is identified by the merchantID inside the signed payload, and there is no HTTP Authorization header. For readability this document models the DECODED JSON payloads (request `payload` and response `payload`) rather than the raw JWT string. The field schemas here are MODELED from the documented parameters and are a representative subset, not a byte-for-byte copy of 2C2P''s contract; verify exact fields against developer.2c2p.com. Endpoint paths are confirmed from the 2C2P developer reference index.'
  version: '4.3'
  contact:
    name: 2C2P Developer
    url: https://developer.2c2p.com
  x-transport-notes: All traffic is HTTPS request/response. Asynchronous results are delivered as a backend notification webhook (2C2P POSTs a signed JWT to the merchant's backendReturnUrl). There is no WebSocket or SSE transport.
servers:
- url: https://pgw.2c2p.com/payment/4.3
  description: Production
- url: https://sandbox-pgw.2c2p.com/payment/4.3
  description: Sandbox
tags:
- name: Payment Token
  description: Initialize a payment and obtain a paymentToken.
paths:
  /paymentToken:
    post:
      operationId: paymentToken
      tags:
      - Payment Token
      summary: Create a payment token
      description: Initializes a payment and returns a paymentToken plus a webPaymentUrl for the hosted payment page. On the wire the request/response are JWTs (HS256, merchant secret key); the decoded payloads are modeled here.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentTokenRequest'
      responses:
        '200':
          description: Decoded payment token response payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentTokenResponse'
components:
  schemas:
    PaymentTokenRequest:
      type: object
      required:
      - merchantID
      - invoiceNo
      - description
      - amount
      - currencyCode
      properties:
        merchantID:
          type: string
          description: Merchant identifier issued by 2C2P.
        invoiceNo:
          type: string
          description: Unique merchant invoice / order number for this transaction.
        description:
          type: string
        amount:
          type: number
          description: Transaction amount.
        currencyCode:
          type: string
          description: ISO 4217 currency code (e.g. SGD, THB, USD).
        paymentChannel:
          type: array
          items:
            type: string
          description: Optional list of allowed payment channels.
        tokenize:
          type: boolean
          description: Request card tokenization for future / recurring use.
        cardTokens:
          type: array
          items:
            type: string
        recurring:
          type: boolean
        invoicePrefix:
          type: string
        frontendReturnUrl:
          type: string
          format: uri
          description: Browser redirect URL after payment.
        backendReturnUrl:
          type: string
          format: uri
          description: Server-to-server notification (webhook) URL.
        locale:
          type: string
    PaymentTokenResponse:
      type: object
      properties:
        webPaymentUrl:
          type: string
          format: uri
          description: Hosted payment page URL to redirect the customer to.
        paymentToken:
          type: string
        respCode:
          type: string
          description: Response code, e.g. "0000" for success.
        respDesc:
          type: string
Where this information came from

This is an independent, third-party profile of 2C2P Payment Token API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.