Response Success
{
"token": "d379aa71-99eb-4dd1-b9bb-eefe813746e9",
"redirect_url": "https://app.sandbox.midtrans.com/snap/v3/redirection/071e0c3d-dade-4148-a1b5-296ee8735b79"
}
HTTP status code: 201
Field | Description |
---|---|
token String(36) | Snap token for opening the Snap popup |
redirect_url String(75) | URL for redirection |
Response Failed
Authentication Failed
{
"error_messages": [
"Access denied due to unauthorized transaction, please check client or server key",
"Visit https://snap-docs.midtrans.com/#request-headers for more details"
]
}
HTTP status code: 401
Field | Description |
---|---|
error_messages Array | Error messages |
Validation Error
{
"error_messages": [
"transaction_details.gross_amount is not equal to the sum of item_details"
]
}
HTTP status code: 400
Field | Description |
---|---|
errormessages _Array | Error messages |
Order ID Already Paid and Utilized
{
"error_messages": [
"transaction_details.order_id has been paid and utilized, please use another order ID"
]
}
HTTP status code: 400
Field | Description |
---|---|
errormessages _Array | Error messages |
Internal System Error
{
"error_messages": [
"Sorry, we encountered internal server error. We will fix this soon."
]
}
HTTP status code: 500
Field | Description |
---|---|
errormessages _Array | Error messages |