Create a payment request and return a payment_token for iframe flow
Create a payment request and return a payment_token for iframe flow
Request body
Example request
{
"merchant_id": "550e8400-e29b-41d4-a716-446655440000",
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+351960123456",
"country": "GB"
},
"order": {
"order_id": "ORD-123456",
"amount": 9300,
"currency": "GBP",
"payment_reference": "Barcelona Tryp",
"locale": "en-GB",
"test_transaction": true,
"rewards": {
"extra_rewards": 150,
"total_rewards": 300,
"description": "Loyalty bonus + base rewards"
}
},
"device_type": "ios",
"billing_address": {
"address_line1": "12 West Common Drive",
"address_line2": "Flat 1",
"apartment": "Apt 5B",
"city": "London",
"state_province": "Greater London",
"country": "GB",
"postal_code": "SE1 1AA",
"company_name": "Acme Ltd"
},
"redirect_urls": {
"success_url": "https://tryp.com/checkout/success",
"failure_url": "https://tryp.com/checkout/error"
},
"webhook_endpoints": [
"wizzair-prod"
]
}Response
Created
Example response
{
"success": true,
"data": {
"payment_token": "ptok_efghijklm...",
"expires_in": 900
}
}Changes
Changed in 4 of the 8 revisions of this API.417
- ○
added the new optional request property
webhook_endpointsnew-optional-request-property
- ○
- ▲
added the pattern
^[A-Za-z]{2}$to the request propertycustomer/countryrequest-property-pattern-added
- ▲
added the pattern
^[A-Za-z]{3}$to the request propertyorder/currencyrequest-property-pattern-added
- ▲
the
error/coderesponse's property type/format changed fromstring/to/for status400response-property-type-changed
- ●
removed the optional property
error/errorsfrom the response with the400statusresponse-optional-property-removed
- ○
added the new optional request property
billing_addressnew-optional-request-property
- ○
added the new optional request property
merchant_idnew-optional-request-property
- ○
added the new optional request property
simulationnew-optional-request-property
- ○
added the optional property
error/metadatato the response with the400statusresponse-optional-property-added
- ○
added
subschema #1subschema #2to theerror/coderesponse propertyallOflist for the response status400response-property-all-of-added
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
endpoint added
endpoint-added
This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 367 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲