Subscribe Callback
Merchant system should implement API to receive callback from FTIPH. The FTIPH will send request to the callback_url given in subscribe request.
Please make sure the callback_url you provided in subscribe request are valid and allow domain name of FTIPH to pass your firewall. Or it might cause transactions unsynchronizable.
Request
This request is sent from FTIPH to merchant system when the transaction status is changed.
HTTP Request Method: POST \ Content-Type: application/json
✅ Required ⭕ Optional ❌ Not used
| Param | Type | Required | Sign | Description |
|---|---|---|---|---|
| user_id | String | ✅ | ✅ | Merchant identification |
| order_id | String | ✅ | ✅ | Payment order Id of merchant system. The order id should be unique. |
| transaction_id | String | ✅ | ✅ | FTIPH transaction id |
| payment_transaction_id | String | ✅ | ✅ | FTIPH subscribe payment transaction id |
| payment_status | String | ✅ | ✅ | 0000 = Waiting 1000 = Processing 2000 = Success 3000 = Failed 4000 = Error 5000 = Expired (It may be successful later.) |
| channel | String | ✅ | ✅ | Please refer to Support Channel |
| submit_currency | String | ✅ | ✅ | Submit currency |
| submit_amount | Float | ✅ | ✅ | Submit amount (Support up to 6 decimal places) |
| accept_currency | String | ✅ | ✅ | The currency real paid |
| accept_amount | Float | ✅ | ✅ | Paid amount of accept currency (Support up to 6 decimal places) |
| exchange_rate | Float | ✅ | ✅ | Exchange rate |
| enabled | Boolean | ✅ | ✅ | Subscription status. true = enabled, false = disabled. |
| period_count | Integer | ✅ | ✅ | Payment cycle (count). Only 1-12 can be filled in. |
| period_unit | Integer | ✅ | ✅ | Payment cycle (unit). 1 = Week. 2 = Month. 3 = Year. |
| subscribe_at | Integer | ✅ | ✅ | Subscription timestamp (10 digits) |
| last_payment_at | Integer | ✅ | ✅ | Last payment timestamp (10 digits) |
| next_payment_at | Integer | ✅ | ✅ | Next payment timestamp (10 digits) |
| timestamp | Integer | ✅ | ✅ | Transaction last update timestamp (10 digits) |
| sign | String | ✅ | ❌ | Signature string. Please refer to Data Signature and Verification |
Response
Please using Content-Type: text/plain return the string SUCCESS when callback is received and the signature is verified. If there are problems such as signature verification failure, please return the string FAILED and both parties will clarify the problem.