Payment object
Attributes
Attribute | Type | Description |
---|---|---|
id | string | The unique, permanent, Clearpay-generated Order ID. |
token | string | Checkout token that was used to complete payment. |
status | string | An order status of “APPROVED” or “DECLINED”. |
created | string | The UTC timestamp of when the payment was completed, in ISO 8601 format. |
originalAmount | Money | Total amount charged to the consumer for the order. |
openToCaptureAmount | Money | Remaining amount that can be captured. Will always be zero for Immediate Payment Flow orders. |
paymentState | string | Current state for capturing payments. Will be one of: “AUTH_APPROVED”, “AUTH_DECLINED”, “PARTIALLY_CAPTURED”, “CAPTURED”, “CAPTURE_DECLINED”, “VOIDED”. |
merchantReference | string | The merchant’s order id/reference that this payment corresponds to. |
refunds | Refund[] | An array of refunds. Note: in response to a Capture Full Payment call, this array will always be empty, since refunds cannot occur until payment is captured. |
orderDetails | Order Details | The details of the order bound to the payment. |
events | Payment Event[] | One or more payment events that have occurred against the order. |
Example Payment object
1 { 2 "id" : "12345678", 3 "token" : "ltqdpjhbqu3veqikk95g7p3fhvcchfvtlsiobah3u4l5nln8gii9", 4 "status" : "APPROVED", 5 "created" : "2019-01-01T00:00:00.000Z", 6 "originalAmount" : { 7 "amount" : "100.00", 8 "currency" : "GBP" 9 }, 10 "openToCaptureAmount" : { 11 "amount" : "100.00", 12 "currency" : "GBP" 13 }, 14 "paymentState" : "AUTH_APPROVED", 15 "merchantReference" : "merchantOrderId-1234", 16 "refunds" : [ 17 ... 18 ], 19 "orderDetails" : { 20 ... 21 }, 22 "events" : [ { 23 "id" : "1OUR16OTqL3DgJ3ELlwKowU9v6K", 24 "created" : "2019-01-01T00:00:00.000Z", 25 "expires" : "2019-01-01T00:00:00.000Z", 26 "type" : "AUTH_APPROVED", 27 "amount" : { 28 "amount" : "100.00", 29 "currency" : "GBP" 30 } 31 }, ... ] 32 }