The Inward API allows partners to send money to Thailand in Real-Time using API calls. If you are interested please contact our [email protected]
Below are a collection of endpoints for creating a transaction
POST <https://auth.staging-deemoney.com/auth/app_identity/callback>
Before we begin working with the system we need to authenticate the application to get access to the token.
You can use your client_id and client_secret to generate a token.
You will need to encode your token like this:
client_id:client_secret
Then you need to encode this string using base64 into a URL friendly format
Once you get the final encoded string you can pass it into the endpoint
{
"token": "theEncodedToken"
}
Once you successfully authenticate you will get a JWT token in the header which you will need to use to make further requests.
In the header, you will see something like this
Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ0aWNrZXRfYm9vdGgiLCJleHAiOjE1NzEwNTE5NzIsImlhdCI6MTU3MTA0ODM3MiwiaXNzIjoidGlja2V0X2Jvb3RoIiwianRpIjoiMDU2NjBmZjAtNWU5My00MjY4LWI3YTItNTZlZDVkOTA0Y2NlIiwibmJmIjoxNTcxMDQ4MzcxLCJwZW0iOnsiYXBwIjoxfSwic3ViIjoiYXBwOjIiLCJ0eXAiOiJhY2Nlc3MifQ.OHh08buCyk4RY2Nhp-qgClKo7INT8buWd_TxgTu3_rHgiegw60GqRRbdDKRaTS7Sx-lg7peROk0g6te8Jg0MYQ
This token will expire in 1 hour. You can use your client_id:client_secret combination to get a new token.
POST <https://engine.staging-deemoney.com/auth/sessions>
Once you get your token from the ticket_booth endpoint you can use it to request the token that will allow you to make transactions.
Request:
{
"token": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ0aWNrZXRfYm9vdGgiLCJleHAiOjE1NzExMTcwMjksImlhdCI6MTU3MTExMzQyOSwiaXNzIjoidGlja2V0X2Jvb3RoIiwianRpIjoiNzc4MDA4ZmMtNjEzNi00NTk0LTg3NDYtYjY1M2JlYTY1ZDVhIiwibmJmIjoxNTcxMTEzNDI4LCJwZW0iOnsiYXBwIjoxfSwic3ViIjoiYXBwOjIiLCJ0eXAiOiJhY2Nlc3MifQ.ZE3MCmx5_sdJX6OqbfTNV7BRwtGXv65n4A98XNF3qxcIWPgd-ZD-LEL7B4Nq5TMzh33BMJJ_4W-kli1sGqRCiw"
}
You will get a response with the transactional token in the header
authorization: Bearer ...
You can use this token to do transactional-related work. This token is short lived which means it will only last for 5 minutes by default.
GET <https://engine.staging-deemoney.com/platform/funds>
You can use this endpoint to get the funds you have. It will display all the funds that your application has in the platform.
{
"data": [
{
"amount": {
"amount": "0.0",
"currency": "THB"
},
"clearing": {
"amount": "0.0",
"currency": "THB"
}
"contract": {
"corridors": [
{
"contract_id": "af3f3569-abde-48d8-baf4-8bc766c2ab49",
"identifier": "account_credit",
"currency": "THB",
"termination": "account_credit",
"minimum_amount": "0",
"deposit_method": "account_credit",
"reasons": [
"family_expense",
"tourism_expense",
"education_expense",
"miscellaneous_services",
"paying_for_goods"
],
"countries": [
{
"iso_code": "TH",
"name": "Thailand"
}
],
"maximums": [
{
"beneficiary_type": "individual",
"per_day_amount": "49999.99",
"per_transaction_amount": "49999.99"
},
{
"beneficiary_type": "company",
"per_day_amount": "49999.99",
"per_transaction_amount": "49999.99"
}
],
"current_rendering": {
"value": "1",
"value_change": "1",
"inserted_at": "2021-11-26T06:41:43.124866Z",
"updated_at": "2022-01-28T03:22:27.715690Z"
},
"metadata": {
"fin_collection_id": null,
"descriptors": []
}
}
],
"id": "a52e82de-97a0-42aa-9f00-016048ee3041"
},
"current_state": "active"
}
]
}
In this response, you will see the contract part with an id field. If you wish to originate a transaction using this contract you will need to reference it in the subsequent requests.