Payment

Create a Payment Transaction Intent

post

Creates a new intent for a payment authorization. An intent helps prepare and track the details required before finalizing a transaction (capture).

Authorizations
Body
external_idstringRequired

A unique identifier from your system to reference this payment intent. Useful for idempotency and for correlating the future transaction within your internal systems.

Example: 496de72d-d4a4-45eb-b426-3d04d2078a85
Responses
200
New payment intent created.
application/json
post
POST /intents/payment HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 563

{
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "redirect_urls": {
    "success": "https://www.example.com/success?trx_id=XYZ&order_id=ZYX",
    "failure": "https://www.example.com/failure?trx_id=XYZ&order_id=ZYX"
  },
  "order": {
    "order_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
    "order_amount": 10000,
    "order_currency": "USD",
    "order_items": [],
    "card_holder": {
      "first_name": "text",
      "middle_name": "text",
      "last_name": "text",
      "dob": "text",
      "email": "[email protected]",
      "phone": "text",
      "address_1": "text",
      "address_2": "text",
      "postal_code": "text",
      "city": "text",
      "state": "text",
      "country": "text"
    }
  }
}
200

New payment intent created.

{
  "intent_id": "int_01J5XCMDXCFXCAQ1BV8HVG6644",
  "reference_id": "496de72d-d4a4-45eb-b426-3d04d2078a85"
}

Was this helpful?