Voucher reservations
POST/v3/vouchers/reservations
Voucher reservations
Request
Path Parameters
Possible values: >= 15 characters and <= 15 characters, Value must match regular expression ^([a-zA-Z0-9]{3}(-[a-zA-Z0-9]{3}){3})$
Seller ID obtained during seller boarding
Header Parameters
Unique key used to authenticate API requests.
The Signature header is used to ensure the request’s body integrity and to confirm that its content has not changed.
The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Can be set to */*.
Possible values: <= 45 characters
A unique identifier used to ensure idempotent behavior. If the business application request fails or you receive a timeout you can retry the request with the same Idempotency-Key to guarantee that only one business object is created.
The Content-Type entity header is used to indicate the media type of the resource.
- application/json
Body
required
Request body for voucher reservation request
Array [
]
Voucher code
Amount of the order. A positive integer in the smallest currency unit.
Possible values: <= 10 characters
transfers
object[]
required
Sellers transfer list
Seller ID
Possible values: <= 15 characters
Transfer gross amount in the smallest currency unit
Possible values: <= 10 characters, >= 1 and <= 100000000
Responses
- 200
- 400
- 401
- 404
- 500
- 503
Success
- application/json
- Schema
- Example (from schema)
Schema
Voucher reservation ID to create payment with voucher code.
Possible values: <= 15 characters
Amount to be paid by the payer. A positive integer in the smallest currency unit.
Possible values: <= 10 characters
Amount to be charged from the voucher. A positive integer in the smallest currency unit.
Possible values: <= 10 characters
transfers
object
required
Seller ID
Possible values: <= 15 characters
Amount to be paid by the payer in the smallest currency unit
Possible values: <= 10 characters, >= 1 and <= 100000000
Amount to be charged from the voucher card balance in the smallest currency unit
Possible values: <= 10 characters, >= 1 and <= 100000000
{
"voucherReservationId": "FW3-4R3-AP1-VSM",
"payerAmount": 5671,
"voucherAmount": 40000,
"transfers": [
{
"sellerId": "MBV-A4F-H2W-ARS",
"payerGrossAmount": 5671,
"voucherGrossAmount": 40000
}
]
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Error status code
errors
object[]
required
Error type
Possible values: [FORBIDDEN, RATE_LIMIT_REACHED, SYSTEM_TEMPORARILY_UNAVAILABLE, VALIDATION_ERROR, VERIFICATION_FAILED, IDEMPOTENCY_KEY_MISSING, SIGNATURE_MISSING, PAYMENT_AMOUNT_TOO_LARGE, PAYMENT_AMOUNT_TOO_SMALL, ORDER_AMOUNT_TOO_SMALL_FOR_VOUCHER, INVALID_SUM_OF_TRANSFERS_GROSS_AMOUNT, VOUCHER_CARD_EXPIRED, VOUCHER_CARD_NO_FUNDS]
Error description
Optional value related to given error type. Applies only to [PAYMENT_AMOUNT_TOO_SMALL, ORDER_AMOUNT_TOO_SMALL_FOR_VOUCHER, PAYMENT_AMOUNT_TOO_LARGE]
{
"statusCode": 0,
"errors": [
{
"errorType": "FORBIDDEN",
"message": "string",
"value": "string"
}
]
}
{
"statusCode": 400,
"errors": [
{
"errorType": "SIGNATURE_MISSING",
"message": "Missing field XXX"
},
{
"errorType": "IDEMPOTENCY_KEY_MISSING",
"message": "Missing field XXX"
}
]
}
Unauthorized, invalid or missing credentials
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
- UnauthorizedErrorDetails
]
Error status code
errors
object[]
required
oneOf
Error details
Error type
Possible values: [UNAUTHORIZED]
Error description
{
"statusCode": 0,
"errors": [
{}
]
}
{
"statusCode": 401,
"errors": [
{
"errorType": "UNAUTHORIZED",
"message": "Unauthorized, invalid or missing credentials"
}
]
}
Not found
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Error status code
errors
object[]
required
Error type
Possible values: [NOT_FOUND]
Error description
{
"statusCode": 0,
"errors": [
{
"errorType": "NOT_FOUND",
"message": "string"
}
]
}
{
"statusCode": 404,
"errors": [
{
"errorType": "NOT_FOUND",
"message": "Resource not found"
}
]
}
Internal server error
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Error status code
errors
object[]
required
Error type
Possible values: [INTERNAL_SERVER_ERROR]
Error description
{
"statusCode": 0,
"errors": [
{
"errorType": "INTERNAL_SERVER_ERROR",
"message": "string"
}
]
}
{
"statusCode": 500,
"errors": [
{
"errorType": "INTERNAL_SERVER_ERROR",
"message": "Internal server error"
}
]
}
Service is temporarily unavailable
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Error status code
errors
object[]
required
Error type
Possible values: [SYSTEM_TEMPORARILY_UNAVAILABLE]
Error description
{
"statusCode": 0,
"errors": [
{
"errorType": "SYSTEM_TEMPORARILY_UNAVAILABLE",
"message": "string"
}
]
}
{
"statusCode": 503,
"errors": [
{
"errorType": "SYSTEM_TEMPORARILY_UNAVAILABLE",
"message": "Service is temporarily unavailable"
}
]
}