Integrate Payment Gateway (Testnet)
Last updated
Last updated
You need to follow these steps to create Order and payment using FRUITS Payment gateway
※If your merchant already has payment information, you don't need to perform this step.
Headers: - API-KEY : After creating a merchant, contact the Fruits Organization to receive an api-key.
Method: POST
Request Body:
Required Parameter: (+) merchantId : merchant id (Please refer to "For Merchant" > "Basic Settings"). (+) product: your product name (+) successUrl: your url that you want to redirect to after user complete payment (+) cancelUrl: your url that you want to redirect to after user cancel payment Optional Parameter: (+) webhookUrl: callback URL when payment is confirmed (+) firstName: customer's first name (+) lastName: customer's last name (+) email: customer's email
Webhook: Method: POST Request body: (+) orderId: Order id. (+) status: Status of order.
Example:
HTTPS Request:
Response:
(+) Successful case:
(+) In case of failure:
Webhook request body:
Depending on the payment method chosen, there will be 2 cases:
If you choose payment method is USD, you need to follow below instruction to complete payment.
If you choose other payment method, it will show QR code (using for wallet) and URL redirect to wallet. You need to follow below instruction to complete payment.
If your need to check order status, please request to below API:
Method: GET
Example:
HTTPS Request:
Response:
(+) Successful case:
(+) In case of failure:
URL:
After getting your order id, you need to access this url to enter to confirm screen:
URL: