ChargeCreate
POSThttps://api.twisto.cz/psp/v4/charges
POSThttps://api.twisto.pl/psp/v4/charges
Create a charge.
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Request body
- authority: object
- type: stringrequiredAllowed values:
checkout_id
- value: stringrequired
- reference: string
<= 140 characters
- amount: string<decimal>required
The amount of the charge (currently only the full amount is supported)
Match pattern:^-?\d{0,8}(?:\.\d{0,2})?$
- currency: stringrequired
ISO-4217 currency code
>= 3 characters
<= 3 characters
- capture: boolean
If true this will be a direct capture (active invoice as a result)
- order: object
- reference: stringrequired
<= 200 characters
Request Body example
{
"authority": {
"type": "checkout_id",
"value": "string"
},
"reference": "string",
"amount": "537.00",
"currency": "str",
"capture": true,
"order": {
"reference": "string"
}
}
Responses
Body
- id: stringrequired
External ID of the charge
- reference: string
Order payment reference
- amount: string<decimal>required
Total amount
Match pattern:^-?\d{0,8}(?:\.\d{0,2})?$
- currency: stringrequired
ISO-4217 currency code
>= 3 characters
<= 3 characters
- captured_amount: string<decimal>required
Captured amount
Match pattern:^-?\d{0,8}(?:\.\d{0,2})?$
- refunded_amount: string<decimal>required
Refunded amount
Match pattern:^-?\d{0,8}(?:\.\d{0,2})?$
- created_date: string<date-time>required
Date when the order was created
- receipt_number: stringrequired
Invoice external ID
- product: stringrequired
Type of service
Allowed values:Twisto
Pay in three
- state: stringrequiredAllowed values:
rejected
authorised
captured
cancelled
refunded
error
Response example
{
"id": "string",
"reference": "string",
"amount": "565.00",
"currency": "str",
"captured_amount": "919.00",
"refunded_amount": "603.00",
"created_date": "string",
"receipt_number": "string",
"product": "Pay in three",
"state": "authorised"
}