Register a PACE Sandbox Card as a payment method
By registering you allow the user to use a PACE Sandbox Card as a payment method. This payment method only works on test environments and is reserved for testing purposes.
Responses
-
201 application/vnd.api+json
Created
-
Already exists
-
400 application/vnd.api+json
Bad request
-
401 application/vnd.api+json
OAuth token missing or invalid or a linked identity is missing.
Linked identity missing is a special case where you need to make sure that the user has additionally logged in / authorized with a third-party.
This is not relevant for most use-cases.
The specific error code that identifies a missing linked identity is
missing-linked-identity
Example:
{ "errors": [ { "id": "cbgmhslmp1o9or9kh1p0", "title": "Missing linked identity for authorized access", "detail": "Linked identity is needed to access this resource, please check why the user does not have a linked identity", "status": "401", "code": "missing-linked-identity" } ] }
-
406 application/vnd.api+json
The specified accept header is invalid
-
409 application/vnd.api+json
Resource conflicts
-
415 application/vnd.api+json
The specified content type header is invalid
-
422 application/vnd.api+json
The request was well-formed but was unable to be followed due to semantic errors. The following codes may be seen:
provider:card-not-usable
: The card is rejected by the payment provider, e.g., credit card expiredprovider:invalid-content
: One or more fields of the payment method is not accepted by the payment provider, e.g., wrong checksum (CVC)invalid-charset
: The fields charset is not latintoo-long
: The fields content is too longprovider:payment-method-rejected
: payment method rejected by provider (identical to1004
below)
-
500 application/vnd.api+json
Internal server error
curl \
-X POST https://api.pace.cloud/pay/2024-3/payment-methods/pacecardsandbox \
-H "Authorization: Bearer $ACCESS_TOKEN"
{
"data": {
"id": "fc900b1f-97fc-4c9c-92de-e6d2f2dcc554",
"type": "paymentMethod",
"attributes": {
"kind": "pacecardsandbox",
"identificationString": "PACE Sandbox Card"
}
}
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "buck3h44qtf5j268141g",
"code": "provider:payment-method-rejected",
"title": "payment method rejected by provider",
"detail": "payment method rejected by provider",
"status": "422"
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}