Skip to content

Environment & Headers

Environment

Data sent in the Staging environment will not trigger an actual purchase.

Components

EnvironmentURL
Staginghttps://api-stage.ifortepay.id
Productionhttps://api.ifortepay.id

ⓘ Whole service can be fully utilized in Production Environment.


Headers

All request headers will implement this format as a guide. Reference for the signature could be found in the upper section of the documents.

Header Request B2B

KeyRequirementDescriptionExample Value
Content-TypeMapplication/json
Authorization CString. Represents access_token of a request; string starts with keyword “Bearer ” followed by access_token (e.g. Bearer eyJraWQiOi...Jzc29zIiwiY)
X-TIMESTAMPMClient's current local time in yyyy-MM-ddTHH:mm:ssTZD format (ISO 8601)2021-11-02T13:14:15+07:00
X-SIGNATUREMRefers to the Signature & Security by using method:
1. Asymmetric Signature without Get Token
2. Symmetric Signature with Get Token
X-PARTNER-IDMYour Unique ID String (36).
Merchant ID.
MCP2021110228
ORIGINOOrigin Domainwww.yourdomain.com
X-EXTERNAL-IDMNumeric String (36).
Reference number that should be unique in the same day
41807553358950093184162180797837
CHANNEL-IDMRefers to each Payment Channel ID on Appendix. String (36)VA001

Header Request Transaction Using B2B2C

NameValue / FormatDetail
Content-Typeapplication/jsonMandatory
AuthorizationStringMandatory. Represents access_token of a request; string starts with keyword Bearer followed by access_token (e.g. Bearer eyJraWQiOi...Jzc29zIiY)
Authorization-CustomerStringConditional. Optional if the payment does not use account binding, but mandatory if the payment uses account binding. Represents access_token of a request belong customer; string starts with keyword Bearer followed by access_token (e.g. Bearer eyJrsWaiOi...Jzc523awiY)
X-TIMESTAMPyyyy-MM-ddTHH:mm:ssTZDMandatory. Client current local time
X-SIGNATUREStringMandatory. Represents signature of a request. X-Signature uses symmetric signature algorithm HMAC_SHA512 (clientSecret).

Formula:
stringToSign = HTTPMethod + ":" + EndpointUrl + ":" + AccessToken + ":" + lowercase(hexEncode(SHA-256(minify(RequestBody)))) + ":" + TimeStamp
X-PARTNER-IDString(36)Mandatory. Unique ID for a partner (merchant_index)
X-EXTERNAL-IDString(36)Mandatory. Numeric string. Reference number that should be unique in the same day per merchant ID
CHANNEL-IDString(20)Mandatory. Payment channel

Components response

NameValueDetail
Content-Typeapplication/json
X-TIMESTAMP2021-11-02T13:14:15+07:00Client's current local time in yyyy-MM-ddTHH:mm:ssTZD format (ISO 8601)

iFortepay API Documentation