Rupiah Token
  • Pintu for Business - IDRT Fiat Gateway Guide (1.0)
  • Dashboard Guide
  • API References (1.0)
  • Testing & Go Live (1.0)
Powered by GitBook
On this page
  • Authentication
  • API References
  • API Request
  • Purchase
  • /submit
  • /cancel
  • /simulate-payment
  • /detail

Was this helpful?

API References (1.0)

The current API version is 1.0

PreviousDashboard GuideNextTesting & Go Live (1.0)

Last updated 4 years ago

Was this helpful?

Authentication

To authenticate your account, you have to include your secret API key in the request which can be accessed in the Dashboard. You may generate your API Key via the Settings page on the Partner dashboard as described further .

API References

API Request

The URL to the API service can be accessed through the following links:

  • Sandbox : https://sandbox.idrt-gateway.rupiahtoken.com/v1

  • Live : https://idrt-gateway.rupiahtoken.com/v1

Purchase

Submit Purchase

Create IDRT Purchase is a process where your user can request to purchase / deposit IDRT via the virtual account (VA) bank transfer through this IDRT Fiat Gateway API. Once the user creates an IDRT purchase / deposit request, our system will feed the required information to process such transaction.

/submit

POST /v1/purchase/submit

This endpoint allows you to create IDRT purchase request for your user.

Headers

Name
Type
Description

Authorization

string

Bearer {API_KEY}

Request Body

Name
Type
Description

name

string

Full Name

user_id

string

User ID of your user registered on your platform

amount

number

IDRT amount

bank

string

PERMATA, MANDIRI, BRI

{
    "purchase_id": "iv-9Fa4ED"
}
{
    "code": "PURCHASE_IN_PROGRESS"
}

Cancel Purchase

Cancel Purchase is a process where your user requests to cancel his/her purchase request that was created previously but has not been completed yet. A purchase request will be automatically cancelled within 24 hours. However, your user can cancel it manually by himself/herself in the case where he/she would like to create another purchase request. Your user cannot create two purchase requests at the same time. Accordingly, your user needs to complete his/her existing purchase request or cancel it to create another new purchase request.

/cancel

POST /v1/purchase/cancel

This endpoint allows you to cancel IDRT purchase request for your user.

Headers

Name
Type
Description

Authorization

string

Bearer {API_KEY}

Request Body

Name
Type
Description

amount

number

IDRT Purchase amount

purchase_id

string

Purchase ID

{
    "purchase_id": "iv-9Fa4ED"
}
{
 "code" : "PURCHASE_ID_NOT_FOUND"
}

/simulate-payment

POST /v1/purchase/simulate-payment

You can simulate payment of your purchase in sandbox mode.

Headers

Name
Type
Description

Authorization

string

Bearer {API_KEY}

Request Body

Name
Type
Description

purchase_id

string

Purchase ID

amount

number

IDRT Purchase Amount

{
    "code": "COMPLETED"
}
{
    "code": "SIMULATE_PAYMENT_FAILED"
}

/detail

GET /v1/purchase/:id

Get detail of a purchase. All values for status field : - pending purchase pending, waiting for bank virtual account creation by our system. - processed bank virtual account has been created, waiting for payment by end-user. - failed purchase failed, this is usually caused by the payment that was sent by the end-user past the due date or time limit") - success purchase success or payment has been paid - canceled purchase canceled

Query Parameters

Name
Type
Description

id

string

Purchase ID

{
    "id": "iv-sjvUMQ",
    "user_id": "23142dssc2xy",
    "status": "processed",
    "bank_name": "PERMATA",
    "bank_account_name": "Sastra Nababan",
    "bank_account_number": "7050100993400703",
    "amount": 30000,
    "creation_date": "2020-11-27T09:52:17.451Z",
    "processing_date": "2020-11-27T09:52:18.415Z",
    "due_date": "2020-11-28T09:52:17.444Z"
}
{
    "id": "iv-cWbAwj",
    "user_id": "23142dssc123x",
    "status": "pending"
}
here