Payment Order
DevelopingPOST
/payment-invoicesRequest
Body Params application/json
data
object
required
type
string
required
attributes
object
required
metadata
object
required
merchantUrl
string
required
Example
{
"data": {
"type": "payment-invoices",
"attributes": {
"reference_id": "12345678-1234-1234-1234-123456789012",
"description": "Transaction 123456",
"currency": "USD",
"amount": 100,
"service": "payment_card_usd_hpp",
"return_url": "https://example.com/payment/return?id=12345678-1234-1234-1234-123456789012",
"return_urls": {
"success": "https://example.com/payment/success",
"pending": "https://example.com/payment/pending?id=12345678-1234-1234-1234-123456789012",
"fail": "https://example.com/payment/fail"
},
"callback_url": "https://webhook.example.com/payment/12345678-1234-1234-1234-123456789012",
"customer": {
"reference_id": "12345678-1234-1234-1234-123456789012",
"name": "JOHN DOE",
"email": "johndoe@example.com"
}
}
},
"Metadata": {
"merchant_url": ""
}
}
Request samples
Responses
Created(201)
HTTP Code: 201
Content Type : JSONapplication/json
Data Schema
data
object
required
type
string
required
id
string
required
attributes
object
required
relationships
object
required
Example
{
"data": {
"type": "payment-invoices",
"id": "cpi_12345678AbCdEfGh",
"attributes": {
"status": "process_pending",
"resolution": "ok",
"moderation_required": false,
"amount": 100.00,
"payment_amount": 100.00,
"currency": "USD",
"service_amount": null,
"payment_service_amount": null,
"exchange_rate": null,
"service_currency": "USD",
"reference_id": "12345678-1234-1234-1234-123456789012",
"test_mode": false,
"fee": 5,
"deposit": 95.00,
"processed": null,
"processed_amount": null,
"refunded_amount": null,
"refunded_fee": null,
"processed_fee": null,
"processed_deposit": null,
"metadata": [],
"flow_data": {
"action": "https://checkout.example.com/hpp/1234abcd",
"method": "GET",
"params": [],
"metadata": {
"sid": "1234abcd",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzaWQiOiIxMjM0YWJjZCIsImV4cGlyZXMiOm51bGwsImV4cCI6MTcyMzMyMjI1MH0.Ata1Ihq_CxzPRaQjjOmMGZG9AsRVQOCrnapXaYhwLA8"
}
},
"flow": "hpp",
"payment_flow": "charge",
"created": 1723318650,
"updated": 1723318651,
"payload": null,
"description": "Transaction 123456",
"descriptor": null,
"callback_url": "https://webhook.example.com/payment/12345678-1234-1234-1234-123456789012",
"return_url": "https://example.com/return?id=12345678-1234-1234-1234-123456789012",
"return_urls": {
"fail": "https://example.com/callback/fail",
"pending": "https://example.com/return?id=12345678-1234-1234-1234-123456789012",
"success": "https://example.com/callback/success"
},
"original_data": [],
"rrn": null,
"arn": null,
"approval_code": null,
"reserved_amount": null,
"reserve_expires": null,
"unreserved": null,
"source": "merchant_api",
"callback_logs": [],
"charged_back_amount": null,
"resolution_message": null,
"hpp_url": "https://capi.example.com/redirect/hpp/?cpi=cpi_12345678AbCdEfGh",
"refunds": [],
"reserves": [],
"reserve_options": null,
"processed_unreserve": null,
"processed_reserve_cancel": null,
"reserve_cancelled": null
},
"relationships": {
"payment-service": {
"data": {
"type": "payment-services",
"id": "payment_card_usd_hpp"
}
},
"payment-method": {
"data": {
"type": "payment-methods",
"id": "payment_card"
}
},
"customer": {
"data": {
⬤
Last modified: a month ago