Bulk Card Ordering
POST/customers/:customerId/prepaid/cards/bulk
The Bulk Card Ordering
endpoint enables you to create in bulk a number of cards (VIRTUAL or PHYSICAL) in a single request. Given the nature of the API, the response from calling the endpoint will contain information about the id
regarding the card bulk issuance request.
Request
Path Parameters
Unique identifier of the customer.
- application/json
Body
Array [
]
Possible values: >= 1
and <= 50
Default value: 1
The number of cards to be created.
Program name provided by Paysafe.
Possible values: >= 3 characters
and <= 3 characters
Currency code in three-letter format ("Alpha-3").
Possible values: Value must match regular expression ^\+\d+\s?\d{1,16}$
If not provided, we will try to use the mobile phone provided during the customer onboarding. Mobile phone number must be in format "+359888333333".
Possible values: <= 200 characters
The User Agent used for the request. The field should follow the official specification - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent#syntax
deliveryAddress
object
The DeliveryAddress object will be used for the PHYSICAL
card delivery. It must be null in case of VIRTUAL
card
Possible values: >= 4 characters
and <= 40 characters
The first line of the address.
Possible values: <= 30 characters
The second line of the address.
Possible values: <= 30 characters
The third line of the address.
Possible values: <= 30 characters
Max 30 characters: letters, spaces, hyphen and period
Possible values: >= 2 characters
and <= 2 characters
Country code in ISO-3166 Alpha 2
Possible values: <= 3 characters
The field is mandatory for US Customers: 2 to 3 characters state or province abbreviation. Example: "UT"
Possible values: non-empty
and <= 16 characters
For EU customers: maximum length 16
For US customers: Pattern: ^[a-zA-Z0-9-\ ]*$
minimum 4, maximum 10
cards
object[]
Possible values: non-empty
and <= 40 characters
External card identifier in merchant system.
Possible values: non-empty
and <= 27 characters
The name that appears on the card. If not provided, firstName lastName
from the customer will be used. Only ASCII characters are allowed.
Responses
- 202
- 400
- 401
- 404
- 500
- 503
Accepted
- application/json
- Schema
- Example (from schema)
Schema
The ID
of the given Bulk Card Ordering
request. It is used for fetching the bulk created cards or for checking the request status.
Provided customerId in the request.
Possible values: >= 1
and <= 50
Default value: 1
The number of cards to be created.
Program name provided by Paysafe.
Possible values: >= 3 characters
and <= 3 characters
Currency code in three-letter format ("Alpha-3").
Possible values: Value must match regular expression ^\+\d+\s?\d{1,16}$
If not provided, we will try to use the mobile phone provided during the customer onboarding. Mobile phone number must be in format "+359888333333".
deliveryAddress
object
The DeliveryAddress object will be used for the PHYSICAL
card delivery. It must be null in case of VIRTUAL
card
Possible values: >= 4 characters
and <= 40 characters
The first line of the address.
Possible values: <= 30 characters
The second line of the address.
Possible values: <= 30 characters
The third line of the address.
Possible values: <= 30 characters
Max 30 characters: letters, spaces, hyphen and period
Possible values: >= 2 characters
and <= 2 characters
Country code in ISO-3166 Alpha 2
Possible values: <= 3 characters
The field is mandatory for US Customers: 2 to 3 characters state or province abbreviation. Example: "UT"
Possible values: non-empty
and <= 16 characters
For EU customers: maximum length 16
For US customers: Pattern: ^[a-zA-Z0-9-\ ]*$
minimum 4, maximum 10
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"customerId": "1231122232",
"quantity": 2,
"programName": "PHYSICAL-MC-EEA",
"currency": "EUR",
"mobile": "+359888333333",
"deliveryAddress": {
"address1": "Tsarigradsko Shose 73",
"address2": "floor 3",
"address3": "apartment 43",
"city": "Sofia",
"countryCode": "BG",
"state": "UT",
"postalCode": "1000"
}
}
Bad Request
- application/json
- Schema
- Example (from schema)
- MISSING_PROGRAM_NAME
- MISSING_QUANTITY_FIELD
- QUANTITY_MISMATCH
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "5068",
"message": "Field error(s)",
"details": [
"Either you submitted a request that is missing a mandatory field or the value of a field does not match the format expected."
],
"fieldErrors": [
{
"field": "programName",
"error": "must not be null"
}
]
}
}
{
"error": {
"code": "5068",
"message": "Field error(s)",
"details": [
"Either you submitted a request that is missing a mandatory field or the value of a field does not match the format expected."
],
"fieldErrors": [
{
"field": "quantity",
"error": "must not be null"
}
]
}
}
{
"error": {
"code": "DW-PREPAID-CARDS-BULK-QUANTITY-MISMATCH",
"message": "Mismatch in the provided quantity field.",
"details": [
"The provided quantity field doesn't match the number of elements in the cards array."
]
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- INVALID_CREDENTIALS
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "5279",
"message": "Invalid credentials",
"details": [
"The authentication credentials are invalid."
]
}
}
Not Found
- application/json
- Schema
- Example (from schema)
- CUSTOMER_NOT_FOUND
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "DW-NO-SUCH-CUSTOMER",
"message": "Customer was not found",
"details": [
"No customer matching the provided data was found."
]
}
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- INTERNAL_SERVER_ERROR
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "DW-INTERNAL-SERVER-ERROR",
"message": "Internal Server Error",
"details": [
"There was an error while processing the operation"
]
}
}
Service Unavailable
- application/json
- Schema
- Example (from schema)
- SERVICE_UNAVAILABLE
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "DW-SERVICE-UNAVAILABLE",
"message": "Service Unavailable",
"details": [
"Service Unavailable"
]
}
}