Checkout transaction
This endpoint is a checkout mode order creation interface. After creating an order, it will redirect to a payment link for payment. This endpoint allows you to process various payment methods, including credit cards, digital wallets, and other payment instruments.
transactions.write
scope.Authorizations
Bearer authentication header of the form `Bearer <token>`, where `<token>` is your auth token.
Headers
The ID of the merchant account to use for this request.
"default"
A unique key to ensure idempotency of the request. If provided, the same request will not be processed multiple times.
"unique-key-123"
Body
application/jsonThe monetary amount to charge, in the smallest currency unit (e.g., 100 cents to charge $1.00).
"1299"
The ISO 4217 three-letter currency code.For redirect requests, this value must match the one specified for currency in payment_method
"USD"
"EUR"
"GBP"
The merchant reference for this transaction. Used to identify the transaction in your system.
"order-12345"
The 2-letter ISO code of the country where the transaction is processed. This is also used to filter the payment services that can process the transaction. If this value is provided for redirect requests and it's not null, it must match the one specified for country in payment_method. Otherwise, the value specified for country in payment_method will be assumed implicitly.
"US"
"GB"
"TH"
The URL to redirect a user back to after the complete 3DS in browser.
"https://example.com"
The webhook URL to receive payment status notifications.
"https://merchant.com/webhooks/payment"
The URL to redirect the user if the payment is cancelled.
"https://merchant.com/payment/cancel"
Guest buyer details provided inline rather than creating a buyer resource beforehand and using the buyer_id or buyer_external_identifier keys.
An array of cart items that represents the line items of a transaction.
The billing details for this transaction.
The shipping details for this transaction.
Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it.
"{"order_id": "12345", "customer_type": "premium"}"
Response
Successful Response
The type of resource.
"transaction"
The unique identifier for this transaction.
"7099948d-7286-47e4-aad8-b68f7eb44591"
The merchant account ID.
"default"
The currency for the transaction.
"EUR"
"USD"
The amount for the transaction.
"1299"
The status of the transaction.
"authorization_succeeded"
"processing"
The external identifier for the transaction.
"transaction-12345"
The URL link for pending payment.
"https://pay.efundpay.com/abc123"
The country of the transaction.
"US"
The error code if any.
"missing_redirect_url"
The buyer information.
The shipping details.
Cart items.
The creation time.
"2013-07-16T19:23:00.000+00:00"
curl --request POST \--url https://api.efundpay.com/v4/checkout/payments \--header 'Authorization: Bearer <token>' \--header 'x-merchant-account-id: <x-merchant-account-id>' \--header 'Content-Type: application/json' \--data '{"amount": 1299,"currency": "USD","redirect_url": "https://yourdomain.com/redirect","webhooks_url": "https://yourdomain.com/webhooks/payment","cancel_url": "https://yourdomain.com/cancel","buyer": {"external_identifier": "buyer-12345","display_name": "John Doe","email_address": "john@example.com","first_name": "John","last_name": "Doe"},"cart_items": [{"name": "GoPro HD","quantity": 1,"unit_amount": 1299}],"external_identifier": "order-12345"}'
{"type": "transaction","id": "7099948d-7286-47e4-aad8-b68f7eb44591","merchant_account_id": "default","currency": "USD","amount": 1299,"status": "processing","country": "US","external_identifier": "order-12345","payment_url_link":"https://pay.efundpay.com/abc123""buyer": {"external_identifier": "buyer-12345","display_name": "John Doe",},"created_at": "2013-07-16T19:23:00.000+00:00"}