Thanks, @m2z, those fields are correct, and I made a generated a page in postman just to check.
The URLs you have are actual URLs rather than …co.uk… correct? It would create an error if you input those specific strings (https://...co.uk/sandbox/cancel.php
).
My guess is the code is generating something, but cart_items seems to have valid fields.
Request
{
"complete_checkout_url": "http://test.co.uk/sandbox/complete.php",
"country": "GB",
"currency": "GBP",
"cancel_checkout_url": "https://test.co.uk/sandbox/cancel.php",
"merchant_reference_id": "950ae8c6-76",
"amount": 102,
"cart_items": [{
"name": "course",
"amount": 51,
"quantity": 2
}
]
}
Response
{
"status": {
"error_code": "",
"status": "SUCCESS",
"message": "",
"response_code": "",
"operation_id": "54cf6685-85b5-4eb7-a898-cff8dc9791bc"
},
"data": {
"id": "checkout_d3af1bd3147dcc93ef7af11b408c9de6",
"status": "NEW",
"language": null,
"merchant_color": "323fff",
"merchant_logo": null,
"merchant_website": "http://rapyd.net",
"merchant_customer_support": {
"url": "http://support.rapyd.net",
"email": "support@rapyd.net",
"phone_number": "555-555-5555"
},
"merchant_alias": "Test Business",
"merchant_terms": null,
"merchant_privacy_policy": null,
"page_expiration": 1657657888,
"redirect_url": "https://sandboxcheckout.rapyd.net?token=checkout_d3af1bd3147dcc93ef7af11b408c9de6",
"merchant_main_button": "pay_now",
"cancel_checkout_url": "https://test.co.uk/sandbox/cancel.php",
"complete_checkout_url": "http://test.co.uk/sandbox/complete.php",
"country": "GB",
"currency": "GBP",
"amount": 102,
"payment": {
"id": null,
"amount": 102,
"original_amount": 0,
"is_partial": false,
"currency_code": "GBP",
"country_code": "GB",
"status": null,
"description": "Payment via Checkout",
"merchant_reference_id": "950ae8c6-76",
"customer_token": null,
"payment_method": null,
"payment_method_data": {},
"expiration": 0,
"captured": false,
"refunded": false,
"refunded_amount": 0,
"receipt_email": null,
"redirect_url": null,
"complete_payment_url": null,
"error_payment_url": null,
"receipt_number": null,
"flow_type": null,
"address": null,
"statement_descriptor": null,
"transaction_id": null,
"created_at": 0,
"updated_at": 0,
"metadata": null,
"failure_code": null,
"failure_message": null,
"paid": false,
"paid_at": 0,
"dispute": null,
"refunds": null,
"order": null,
"outcome": null,
"visual_codes": {},
"textual_codes": {},
"instructions": {},
"ewallet_id": null,
"ewallets": [],
"payment_method_options": {},
"payment_method_type": null,
"payment_method_type_category": null,
"fx_rate": null,
"merchant_requested_currency": null,
"merchant_requested_amount": null,
"fixed_side": null,
"payment_fees": null,
"invoice": null,
"escrow": null,
"group_payment": null,
"cancel_reason": null,
"initiation_type": "customer_present",
"mid": null,
"next_action": "not_applicable"
},
"payment_method_type": null,
"payment_method_type_categories": null,
"payment_method_types_include": null,
"payment_method_types_exclude": null,
"customer": null,
"custom_elements": {
"save_card_default": false,
"display_description": false,
"payment_fees_display": true,
"merchant_currency_only": false,
"billing_address_collect": false,
"dynamic_currency_conversion": false
},
"timestamp": 1656448288,
"payment_expiration": null,
"cart_items": [
{
"name": "course",
"amount": 51,
"quantity": 2,
"image": null
}
],
"escrow": null,
"escrow_release_days": null
}
}