Create a payment session
Creates a hosted payment session and returns a client_secret (embedded hosted fields — SAQ A-EP), a hosted_page_url (our hosted payment page — SAQ A) and an expires_at. The customer completes the payment on either surface; capture/void/refund and webhooks are shared with /v2/payments/{id}.
Authorization
ApiKey Merchant API key for authentication
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/payment-sessions" \ -H "Content-Type: application/json" \ -d '{ "amount": 1000, "currency": "EUR", "reference": "order_12345", "capture_mode": "automatic", "payment_method": { "type": "card" }, "customer": { "email": "buyer@example.com" } }'{ "id": "string", "amount": 1, "currency": "str", "status": "created", "capture_mode": "automatic", "authorized_amount": 0, "captured_amount": 0, "refunded_amount": 0, "disputed_amount": 0, "used_method_family": "string", "used_method_type": "string", "payment_method": { "type": "string", "token": "string" }, "dcc": { "currency": "str", "amount": 0 }, "reference": "string", "description": "string", "customer": { "reference": "string", "email": "string" }, "metadata": { "property1": null, "property2": null }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "client_secret": "string", "redirect_url": "string", "hosted_page_url": "string", "action_url": "string", "expires_at": "2019-08-24T14:15:22Z"}