Create transaction
Create a new payment transaction using EFundFlow API. 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"
The originating IP address of the client connecting to the server.
"203.0.113.195"
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 payment method to be used for this transaction. Includes both card-based and alternative payment methods (APM). For detailed descriptions of each payment method, see Payment Methods.
Guest buyer details provided inline rather than creating a buyer resource beforehand and using the buyer_id or buyer_external_identifier keys.When payment_method.method is apm, this field is required.
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"}"
Information about the browser used by the buyer. This can be used by anti-fraud services. Merchant provided browser info.
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 payment method used for this transaction.
The method used for the transaction.
"card"
The country of the transaction.
"US"
The error code if any.
"missing_redirect_url"
The buyer information.
The shipping details.
Cart items.
3D Secure information.
The creation time.
"2013-07-16T19:23:00.000+00:00"
curl --request POST \--url https://api.efundpay.com/v4/transactions/payments \--header 'Authorization: Bearer <token>' \--header 'x-merchant-account-id: <x-merchant-account-id>' \--header 'X-Forwarded-For: 203.0.113.195' \--header 'Content-Type: application/json' \--data '{"amount": 1299,"currency": "USD","payment_method": {"method": "card","number": "4111111111111111","expiration_date": "12/25","security_code": "123","redirect_url": "https://example.com","webhooks_url": "https://yourdomain.com/webhooks/payment",},"buyer": {"display_name": "John Doe","email_address": "john@example.com"},"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_method": {"method": "card","scheme": "visa","expiration_date": "12/25","country": "US","details": {"bin": "411111","card_type": "credit","card_issuer_name": "Test Bank"},"payment_url_link":"https://pay.efundpay.com/abc123","payment_app_link":"app://pay/abc123","url_link_expire_sec":300,"payment_qr_code":"weixin://wxpay/bizpayurl?pr=abc123","payment_qr_code_expire_sec":300},"method": "card","buyer": {"type": "buyer","id": "fe26475d-ec3e-4884-9553-f7356683f7f9","display_name": "John Doe","external_identifier": "buyer-12345",},"created_at": "2013-07-16T19:23:00.000+00:00"}