Create Payment Session
Request a windowed time of payment session
POST
[BASE_URL]/v2/payments
Request
Request Body
{
"clientReferenceId": "1743240980",
"amount": {
"value": 10000,
"currency": "IDR"
},
"paymentMethod": {
"type": "VIRTUAL_ACCOUNT"
},
"paymentMethodOptions": {
"virtualAccount": {
"channel": "PERMATA",
"virtualAccountName": "Reforza Pivot"
}
},
"mode": "REDIRECT",
"redirectUrl": {
"successReturnUrl": "https://merchant.com/success",
"failureReturnUrl": "https://merchant.com/failure",
"expirationReturnUrl": "https://merchant.com/expiration"
},
"customerId": "999966660001",
"customer": {
"givenName": "Reforza Jordan",
"sureName": "Geotama",
"email": "reforza@pivot-payment.com",
"phoneNumber": {
"countryCode": "+62",
"number": "89699990001"
},
"refundPreference": {
"method": "AUTO",
"transferDestination": {
"channelCode": "014",
"channelInformation": {
"accountNumber": "17677665415",
"accountName": "Reforza Jordan Geotama"
}
}
}
},
"orderInformation": {
"productDetails": [
{
"type": "PHYSICAL",
"category": "FASHION",
"subCategory": "FASHION WANITA",
"name": "Dress Kasual Warna Putih",
"description": "Ukuran M",
"quantity": 1,
"price": {
"value": 100000,
"currency": "IDR"
}
}
],
"billingInfo": {
"givenName": "Reforza Jordan",
"sureName": "Geotama",
"email": "reforza@pivot-payment.com",
"phoneNumber": {
"countryCode": "+62",
"number": "89699990001"
},
"addressLine1": "Biomedical Building Lantai 3",
"addressLine2": "Digital hub, BSD City",
"city": "Tangerang Regency",
"provinceState": "Banten",
"country": "ID",
"postalCode": "15331"
},
"shippingInfo": {
"givenName": "Reforza Jordan",
"sureName": "Geotama",
"email": "reforza@pivot-payment.com",
"phoneNumber": {
"countryCode": "+62",
"number": "89699990001"
},
"addressLine1": "Biomedical Building Lantai 3",
"addressLine2": "Digital hub, BSD City",
"city": "Tangerang Regency",
"provinceState": "Banten",
"country": "ID",
"postalCode": "15331",
"method": "REGULAR",
"shippingFee": {
"value": 100000,
"currency": "IDR"
}
}
},
"autoConfirm": true,
"statementDescriptor": "Pivot",
"expiryAt": "2025-03-31T23:59:05Z",
"metadata": {
"invoiceNo": "INV001"
}
}
Detail Parameter Request
clientReferenceId
Alphanumeric
M
Unique Payment Reference from Merchant's Request
mode
String
O
Default to REDIRECT
Payment Session mode. Possible values are:
REDIRECT will return redirectUrl
API
customerId
String
O
Auto generated based on email as the unique identifier *Choose either to send customerId or customer Object
customer
Object
C
Customer Object Customer information *Choose either to send customerId or customer Object
autoConfirm
Boolean
O
Default to true
If the confirmation method is set to false. Then clients need to hit the /confirm endpoint
statementDescriptor
String
O
Default = Merchant’s short name
Statement descriptors allow a maximum 20 characters for all the concatenated characters (including space).
It will be shown on invoice, receipt, and for payment methods that support custom descriptors, it will be shown on the customer's bank statement.
expiryAt
String
O
Session expired time set by merchant with format YYYY-MM-DDTHH:MM:SSZ. The default expiration time is 15 mins.
metadata
Object
O
Free object for merchant to store any extra information about the payment session
Response
Response Body
{
"code": "00",
"message": "Success",
"data": {
"id": "7f65c757-355f-4645-ac14-028b34ab51b1",
"clientReferenceId": "1743240980",
"amount": {
"value": 10000,
"currency": "IDR"
},
"autoConfirm": true,
"mode": "REDIRECT",
"redirectUrl": {
"successReturnUrl": "https://merchant.com/success",
"failureReturnUrl": "https://merchant.com/failure",
"expirationReturnUrl": "https://merchant.com/expiration"
},
"paymentMethod": {
"type": "VIRTUAL_ACCOUNT"
},
"statementDescriptor": "Pivot",
"status": "REQUIRE_ACTION",
"createdAt": "2025-03-30T05:48:17.0549468Z",
"updatedAt": "2025-03-30T05:48:17.103243713Z",
"expiryAt": "2025-03-31T23:59:05Z",
"paymentUrl": "https://payment.pivot-payment.com/detail?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1dWlkIjoiN2Y2NWM3NTctMzU1Zi00NjQ1LWFjMTQtMDI4YjM0YWI1MWIxIiwiaXNzIjoiYmFja2VuZC1wb3J0YWwiLCJleHAiOjE3NDM0NjU1NDV9.55-QdvI0xVtivNLJzREPDGzUbqFNEj7ouFUCvrzAIbw",
"chargeDetails": [
{
"id": "b4db4aa5-4ee4-4722-b414-050c745c93cd",
"paymentSessionId": "7f65c757-355f-4645-ac14-028b34ab51b1",
"paymentSessionClientReferenceId": "1743313696",
"amount": {
"value": 10000,
"currency": "IDR"
},
"statementDescriptor": "",
"status": "WAITING_FOR_USER_ACTION",
"authorizedAmount": null,
"capturedAmount": null,
"isCaptured": false,
"createdAt": "2025-03-30T05:48:17.105883834Z",
"updatedAt": "2025-03-30T05:48:17.105883916Z",
"paidAt": null,
"virtualAccount": {
"channel": "PERMATA",
"virtualAccountNumber": "76630000123456",
"virtualAccountName": " - Reforza Pivot",
"expiryAt": "2025-03-30T23:59:05Z"
}
}
],
"customerId": "999966660001",
"customer": {
"givenName": "Reforza Jordan",
"sureName": "Geotama",
"email": "reforza@pivot-payment.com",
"phoneNumber": {
"countryCode": "+62",
"number": "89699990001"
},
"refundPreference": {
"method": "AUTO",
"transferDestination": {
"channelCode": "014",
"channelInformation": {
"accountNumber": "17677665415",
"accountName": "Reforza Jordan Geotama"
}
}
},
"storedPaymentMethods": [
{
"token": "bicbiweu63c",
"paymentMethod": "ewallet",
"paymentChannel": "dana",
"createdAt": "2024-03-15T09:37:00Z",
"status": "ACTIVE"
},
{
"token": "bicewnbf3eu63c",
"paymentMethod": "cards",
"paymentChannel": "visa",
"createdAt": "2024-06-15T09:37:00Z",
"status": "ACTIVE"
}
]
},
"cancelledAt": null,
"cancellationReason": null,
"metadata": {
"invoiceNo": "INV001"
}
}
}
Detail Parameter Response
Last updated