Payment intents

Create a payment intent

post/api/v1/payment-intents

Request

  • Base URL: https://api.xrpay.it
  • URL: https://api.xrpay.it/api/v1/payment-intents
  • Auth: HTTP bearer

Headers

Idempotency-Keystring required

Stable key for one logical operation. Reusing a key with different parameters returns HTTP 409.

Request body

amount_minorinteger required

Fiat amount in the currency's smallest unit.

currencystring required
external_order_idstring required
order_numberstring
customer_emailstring email
location_idstring
terminal_idstring
operator_idstring
integration_type'pos' | 'ecommerce' | 'invoice' | 'payment_link' | 'api'
payment_method_typesstring[]

Optional allow-list enforced by both the hosted checkout UI and server actions.

collection_mode'hosted' | 'direct'

Use direct with mobile_money to send the approval prompt to the customer's phone without creating a hosted checkout page.

settlement_currency'XRP' | 'RLUSD'
metadataobject
success_urlstring uri
cancel_urlstring uri
expires_ininteger

Relative expiry in seconds. Mutually exclusive with expires_at.

expires_atstring date-time

Absolute expiry at least 60 seconds and no more than 30 days ahead. Mutually exclusive with expires_in.

Example request

{
  "currency": "USD",
  "payment_method_data": {
    "mobile_money": {
      "country": "GH",
      "network": "mtn",
      "phone": "+233599233665"
    }
  }
}

Response

Idempotent replay

object'payment_intent' required
idstring required
status'requires_customer_action' | 'processing' | 'succeeded' | 'failed' | 'expired' | 'canceled' required
amount_minorinteger required
currencystring required
external_order_idstring required
order_numberstring nullable
customer_emailstring nullable
location_idstring nullable
terminal_idstring nullable
operator_idstring nullable
integration_typestring
metadataobject nullable
line_itemsobject[] nullable
payment_method_typesstring[] nullable
payment_methodstring nullable
collection_mode'hosted' | 'direct'
refunded_amount_minorinteger
failure_codestring nullable
livemodeboolean required
sandbox_simulatedboolean required
api_versionstring
created_atstring date-time required
updated_atstring date-time
expires_atstring date-time required
canceled_atstring date-time nullable

Changes

No recorded changes to this operation across all 1 revision of this API.