PAYJN Collections API
The Collections API from PAYJN, for collections.
The Collections API from PAYJN, for collections.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/payjn-com:payjn-com-collections-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PAYJN Payment Collections API
version: '2026-11-29'
summary: One API for local pay-ins and payouts in Indonesia, Pakistan, Bangladesh, Vietnam, India and Malaysia.
description: 'Public reference. The same endpoints, fields, signing and result notifications are used in every market; change countryCode, the payment method code and the amount. Your API host, merchant code and full integration documentation are provided after onboarding at https://www.payjn.com/contact/.
Order status values: SUCCESS, FAILURE, PROCESSING, CANCELLED.
Countries: Indonesia (IDN, IDR), Pakistan (PAK, PKR), Bangladesh (BD, BDT), Vietnam (VN, VND), India (IN, INR), Malaysia (MY, MYR).'
contact:
name: PAYJN
url: https://www.payjn.com/contact/
servers:
- url: https://{your-api-host}
description: Your API host, provided after onboarding
tags:
- name: Collections
paths:
/api-pay/collection/order/create-h5:
post:
operationId: collectionsCreate
summary: Create a collection order
description: 'Create a pay-in order for a customer. Use the hosted checkout (H5 cashier) to send the customer to a PAYJN payment page, or the API mode to show the payment details on your own checkout page. Both modes use the same order query and the same result notification.
The API mode (create-api) is available in Indonesia. Other markets use the hosted checkout.
Treat the order as paid only after a SUCCESS result from the notification or the order query, never from the customer''s return to returnUrl.'
tags:
- Collections
externalDocs:
url: https://docs.payjn.com/collections/create/
parameters:
- name: sign
in: header
required: true
description: 'Request signature: SHA256withRSA over the JSON body joined with the endpoint path by ''&'', Base64-encoded.'
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
merchantCode:
type: string
maxLength: 6
description: Your merchant code, issued by PAYJN after onboarding.
paymentMethodCode:
type: string
description: Payment method, for example QRIS or a bank code for a virtual account. See the country pages or Query payment methods.
merchantOrderId:
type: string
maxLength: 50
description: Your own order number. Letters and digits, up to 50 characters, unique in your system. Used for queries and to prevent duplicates.
amount:
type: integer
description: Order amount in local currency. Decimals are not supported.
merchantNotifyUrl:
type: string
description: Your server URL that receives the asynchronous result notification for this order.
returnUrl:
type: string
description: Page the customer returns to after paying.
remark:
type: string
description: Free text, returned unchanged in the response.
customer:
type: object
description: Customer information.
properties:
name:
type: string
description: Customer's name.
phone:
type: string
description: Customer's mobile number in the local format of the country.
email:
type: string
description: Customer's email address, in a valid email format.
required:
- name
- phone
- email
required:
- merchantCode
- paymentMethodCode
- merchantOrderId
- amount
- merchantNotifyUrl
- customer
example:
merchantCode: '100001'
paymentMethodCode: QRIS
merchantOrderId: ORDER20261129001
amount: 50000
merchantNotifyUrl: https://merchant.example.com/payjn/notify
returnUrl: https://merchant.example.com/orders/ORDER20261129001
customer:
name: Customer Name
phone: 081234567890
email: customer@example.com
responses:
'200':
description: Envelope with code 200 on success; any other code is an error described by msg.
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: 200 means the request was accepted. Any other value is an error; see msg.
msg:
type: string
description: Error message when code is not 200.
data:
type: object
description: Result object, returned when code is 200.
properties:
merchantCode:
type: string
description: Your merchant code.
countryCode:
type: string
description: Country code of the order.
platformOrderId:
type: string
maxLength: 32
description: PAYJN order number.
merchantOrderId:
type: string
maxLength: 50
description: Your order number.
amount:
type: string
description: Order amount in local currency.
status:
type: string
description: SUCCESS, FAILURE, PROCESSING or CANCELLED. See Order status.
paymentMethodCode:
type: string
description: Payment method of the order.
paymentInfo:
type: object
properties:
type:
type: string
description: url, code or json. Hosted checkout always returns url.
content:
type: string
description: Payment URL (type url), or the VA number or QR text (type code, API mode).
returnUrl:
type: string
description: Return URL from the request.
transFeeRate:
type: string
description: Fee rate applied to the order, as agreed for your merchant account.
transFee:
type: string
description: Fee for this transaction.
totalTransFee:
type: string
description: Total fee for the order.
desc:
type: string
description: Result description.
createTime:
type: string
description: Creation time in the market's local time, yyyy-MM-dd HH:mm:ss.
example:
code: 200
msg: ''
data:
merchantCode: '100001'
countryCode: IDN
platformOrderId: C1000011764400000000001
merchantOrderId: ORDER20261129001
amount: '50000'
status: PROCESSING
paymentMethodCode: QRIS
paymentInfo:
type: url
content: https://{checkout-host}/pay/...
createTime: '2026-11-29 10:00:00'
/api-pay/collection/order/create-api:
post:
operationId: collectionsCreateApi
summary: Create a collection order (API mode, Indonesia)
description: 'Create a pay-in order for a customer. Use the hosted checkout (H5 cashier) to send the customer to a PAYJN payment page, or the API mode to show the payment details on your own checkout page. Both modes use the same order query and the same result notification.
The API mode (create-api) is available in Indonesia. Other markets use the hosted checkout.
Treat the order as paid only after a SUCCESS result from the notification or the order query, never from the customer''s return to returnUrl.'
tags:
- Collections
externalDocs:
url: https://docs.payjn.com/collections/create/
parameters:
- name: sign
in: header
required: true
description: 'Request signature: SHA256withRSA over the JSON body joined with the endpoint path by ''&'', Base64-encoded.'
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
merchantCode:
type: string
maxLength: 6
description: Your merchant code, issued by PAYJN after onboarding.
paymentMethodCode:
type: string
description: Payment method, for example QRIS or a bank code for a virtual account. See the country pages or Query payment methods.
merchantOrderId:
type: string
maxLength: 50
description: Your own order number. Letters and digits, up to 50 characters, unique in your system. Used for queries and to prevent duplicates.
amount:
type: integer
description: Order amount in local currency. Decimals are not supported.
merchantNotifyUrl:
type: string
description: Your server URL that receives the asynchronous result notification for this order.
returnUrl:
type: string
description: Page the customer returns to after paying.
remark:
type: string
description: Free text, returned unchanged in the response.
customer:
type: object
description: Customer information.
properties:
name:
type: string
description: Customer's name.
phone:
type: string
description: Customer's mobile number in the local format of the country.
email:
type: string
description: Customer's email address, in a valid email format.
required:
- name
- phone
- email
required:
- merchantCode
- paymentMethodCode
- merchantOrderId
- amount
- merchantNotifyUrl
- customer
example:
merchantCode: '100001'
paymentMethodCode: QRIS
merchantOrderId: ORDER20261129001
amount: 50000
merchantNotifyUrl: https://merchant.example.com/payjn/notify
returnUrl: https://merchant.example.com/orders/ORDER20261129001
customer:
name: Customer Name
phone: 081234567890
email: customer@example.com
responses:
'200':
description: Envelope with code 200 on success; any other code is an error described by msg.
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: 200 means the request was accepted. Any other value is an error; see msg.
msg:
type: string
description: Error message when code is not 200.
data:
type: object
description: Result object, returned when code is 200.
properties:
merchantCode:
type: string
description: Your merchant code.
countryCode:
type: string
description: Country code of the order.
platformOrderId:
type: string
maxLength: 32
description: PAYJN order number.
merchantOrderId:
type: string
maxLength: 50
description: Your order number.
amount:
type: string
description: Order amount in local currency.
status:
type: string
description: SUCCESS, FAILURE, PROCESSING or CANCELLED. See Order status.
paymentMethodCode:
type: string
description: Payment method of the order.
paymentInfo:
type: object
properties:
type:
type: string
description: url, code or json. Hosted checkout always returns url.
content:
type: string
description: Payment URL (type url), or the VA number or QR text (type code, API mode).
returnUrl:
type: string
description: Return URL from the request.
transFeeRate:
type: string
description: Fee rate applied to the order, as agreed for your merchant account.
transFee:
type: string
description: Fee for this transaction.
totalTransFee:
type: string
description: Total fee for the order.
desc:
type: string
description: Result description.
createTime:
type: string
description: Creation time in the market's local time, yyyy-MM-dd HH:mm:ss.
example:
code: 200
msg: ''
data:
merchantCode: '100001'
countryCode: IDN
platformOrderId: C1000011764400000000001
merchantOrderId: ORDER20261129001
amount: '50000'
status: PROCESSING
paymentMethodCode: QRIS
paymentInfo:
type: url
content: https://{checkout-host}/pay/...
createTime: '2026-11-29 10:00:00'
/api-pay/collection/order/query:
post:
operationId: collectionsQuery
summary: Query a collection order
description: Get the current status of a pay-in order by your order number. Use it when a notification has not arrived, before support answers a customer, and in reconciliation.
tags:
- Collections
externalDocs:
url: https://docs.payjn.com/collections/query/
parameters:
- name: sign
in: header
required: true
description: 'Request signature: SHA256withRSA over the JSON body joined with the endpoint path by ''&'', Base64-encoded.'
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
merchantCode:
type: string
maxLength: 6
description: Your merchant code, issued by PAYJN after onboarding.
merchantOrderId:
type: string
maxLength: 50
description: Your own order number. Letters and digits, up to 50 characters, unique in your system. Used for queries and to prevent duplicates.
required:
- merchantCode
- merchantOrderId
example:
merchantCode: '100001'
merchantOrderId: ORDER20261129001
responses:
'200':
description: Envelope with code 200 on success; any other code is an error described by msg.
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: 200 means the request was accepted. Any other value is an error; see msg.
msg:
type: string
description: Error message when code is not 200.
data:
type: object
description: Result object, returned when code is 200.
properties:
merchantCode:
type: string
description: Your merchant code.
countryCode:
type: string
description: Country code of the order.
platformOrderId:
type: string
maxLength: 32
description: PAYJN order number.
merchantOrderId:
type: string
maxLength: 50
description: Your order number.
amount:
type: string
description: Order amount in local currency.
status:
type: string
description: SUCCESS, FAILURE, PROCESSING or CANCELLED. See Order status.
paidAmount:
type: string
description: Amount actually received. It can differ from amount; credit what your rules allow.
paymentMethodCode:
type: string
description: Payment method of the order.
successTime:
type: string
description: Time the payment succeeded, local time.
/api-pay/collection/merchant/paymentMethods:
post:
operationId: collectionsPaymentMethods
summary: Query available payment methods
description: List the pay-in methods enabled for your merchant account in a country, with the minimum and maximum amount of each. Use it to build your checkout instead of hard-coding methods.
tags:
- Collections
externalDocs:
url: https://docs.payjn.com/collections/payment-methods/
parameters:
- name: sign
in: header
required: true
description: 'Request signature: SHA256withRSA over the JSON body joined with the endpoint path by ''&'', Base64-encoded.'
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
merchantCode:
type: string
maxLength: 6
description: Your merchant code, issued by PAYJN after onboarding.
countryCode:
type: string
description: Country code of the market, for example IDN for Indonesia. See the country pages.
required:
- merchantCode
- countryCode
example:
merchantCode: '100001'
countryCode: IDN
responses:
'200':
description: Envelope with code 200 on success; any other code is an error described by msg.
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: 200 means the request was accepted. Any other value is an error; see msg.
msg:
type: string
description: Error message when code is not 200.
data:
type: array
items:
type: object
properties:
paymentMethodCode:
type: string
description: Method code to send when creating an order.
miniAmount:
type: integer
description: Minimum amount for this method on your account.
maxAmount:
type: integer
description: Maximum amount for this method on your account.
description: Enabled methods.
/api-pay/collection/merchant/historySuccessOrder:
post:
operationId: collectionsDailySuccess
summary: List a day's successful orders
description: 'Page through all successful pay-in orders of one day for reconciliation against your own records.
Available in Indonesia, Pakistan, Bangladesh and Malaysia.'
tags:
- Collections
externalDocs:
url: https://docs.payjn.com/collections/daily-success/
parameters:
- name: sign
in: header
required: true
description: 'Request signature: SHA256withRSA over the JSON body joined with the endpoint path by ''&'', Base64-encoded.'
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
merchantCode:
type: string
maxLength: 6
description: Your merchant code, issued by PAYJN after onboarding.
date:
type: string
description: Day to list, yyyy-MM-dd.
countryCode:
type: string
description: Country code of the market, for example IDN for Indonesia. See the country pages.
payType:
type: string
description: Order type to list.
pageNum:
type: integer
description: Page number, starting from 1.
pageSize:
type: integer
description: Records per page.
required:
- merchantCode
- date
- countryCode
- payType
- pageNum
- pageSize
example:
merchantCode: '100001'
date: '2026-11-28'
countryCode: IDN
payType: COLLECTION
pageNum: 1
pageSize: 100
responses:
'200':
description: Envelope with code 200 on success; any other code is an error described by msg.
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: 200 means the request was accepted. Any other value is an error; see msg.
msg:
type: string
description: Error message when code is not 200.
data:
type: object
description: Result object, returned when code is 200.
properties:
total:
type: string
description: Number of successful orders that day.
list:
type: array
items:
type: object
properties:
mid:
type: string
description: Your order number.
ct:
type: string
description: Creation time.
ft:
type: string
description: Success time.
amt:
type: string
description: Order amount.
pamt:
type: string
description: Amount actually paid.
fee:
type: string
description: Fee.
md:
type: string
description: Payment method code.
externalDocs:
description: PAYJN API documentation
url: https://docs.payjn.com/