Interactive API test

Create a new Payment Transaction.

post

Create a new Payment Transaction example.


Authentication Notes

The Api-Key is already automatically added to the headers, so no authentication type required.

If you want to choose your preferred authentication type, follow these steps:

  • Deselect the Api-Key header and choose one of the following:
    • For ApiKeyAuth, use: Api-Key vSUmxsXx.V81oYvOWFMcIywaOu57Utx6VSCmG11lo.
    • For BasicAuth, provide your valid username and password.
    • For JWT Auth, include your token in the format: Bearer <your_token>.
Authorizations
Header parameters
AuthorizationstringRequired

Private API key to be provided in the format Api-Key <key>.

Default: Api-Key vSUmxsXx.V81oYvOWFMcIywaOu57Utx6VSCmG11lo
Body

Serializer to work with PaymentTransaction instances.

Also uses request data from other serializers to save into PaymentTransaction db table:

amountstring · decimalRequiredPattern: ^-?\d{0,7}(?:\.\d{0,3})?$
currency_codestring · min: 1Required
pg_codesstring[]Required
typestring · enumRequired
  • e_commerce - Ecommerce
  • payment_request - Payment Request
Possible values:
Responses
201Success
application/json
post
POST /b/checkout/v1/pymt-txn/ HTTP/1.1
Host: betabulk.ottu.net
Authorization: Api-Key vSUmxsXx.V81oYvOWFMcIywaOu57Utx6VSCmG11lo
Content-Type: application/json
Accept: */*
Content-Length: 92

{
  "amount": "1.000",
  "currency_code": "KWD",
  "pg_codes": [
    "knet",
    "mpgs"
  ],
  "type": "payment_request"
}
{
  "amount": "text",
  "currency_code": "text",
  "pg_codes": [
    "text"
  ],
  "type": "e_commerce"
}

Last updated