Creating Fiat Payin (Gaming) order
Creating an order
POST /orders/gaming
API
Create a payin order for any of the enabled payment methods.
The payment_code
& payment_type
field within the Create Payin with wallet payload , allows merchants to specify which exact payment method are available for the end user to make payment. This field is not mandatory; however, if provided, it restricts the method that can be used for the transaction.
If payment_code
& payment_type
is not specified, the end user will have the option to make the payment using any of the enabled payment methods.
- Request payload without payment code and payment type :
curl --request POST \
--url https://sandbox-api.transfi.com/v2/orders/gaming \
--header 'MID: ABCDEF_NA_NA' \
--header 'accept: application/json' \
--header 'authorization: Basic dHJhbnNmaV9xYT' \
--header 'content-type: application/json' \
--data '
{
"amount": 25,
"currency": "EUR",
"email": "[email protected]",
"partnerId": "order-081124_00001",
"purposeCode": "expense_or_medical_reimbursement",
"redirectUrl": "https://www.transfi.com",
"sourceUrl": "https://transfi.com/"
}
'
{
"orderId": "OR-1234567890123456789",
"paymentUrl": "https://sandbox-pay-widget.transfi.com/gaming?paytoken=1a1a1a1a1a-1a1a11a11a-1a1a1aa1a",
"partnerContext": {},
"redirectUrl": "https://www.yourRedirectPage.com"
}
- Request payload with payment code or payment type :
curl --request POST \
--url https://sandbox-api.transfi.com/v2/orders/gaming \
--header 'MID: ABCDEF_NA_NA' \
--header 'accept: application/json' \
--header 'authorization: Basic dHJhbnNmaV9xYT' \
--header 'content-type: application/json' \
--data '
{
"amount": 25,
"currency": "EUR",
"email": "[email protected]",
"partnerId": "order-081124_00001",
"paymentType": "bank_transfer",
"paymentCode": "sepa_pull",
"purposeCode": "expense_or_medical_reimbursement",
"redirectUrl": "https://www.transfi.com",
"sourceUrl": "https://transfi.com/"
}
'
{
"orderId": "OR-1234567890123456789",
"paymentUrl": "https://sandbox-pay-widget.transfi.com/gaming?paytoken=1a1a1a1a1a-1a1a11a11a-1a1a1aa1a",
"partnerContext": {},
"redirectUrl": "https://www.yourRedirectPage.com"
}
Sending your user to pay with the redirectURL
In the previous step, we created our payment. At the end of that step, we received a response from the API with all the payment details, and in this step, we will be using the paymentUrl
.
After you've successfully created the payment you will need to redirect your end-user to the hosted page to make their payment. After redirecting, there's nothing to do but wait!





Updated 4 days ago