Shift4 API is a REST-based API that allows fast and easy integration. We use HTTP for transport and return all responses encoded as JSON.
To simplify integration and testing, each account has two modes: test mode and live mode. Each mode has its own set of public and secret keys. We guarantee that test-mode data never reach real customers and never costs you money.
API ENDPOINT
https://api.shift4.com
Shift4 API uses "HTTP Basic authentication" for authentication. All requests to our API must be authenticated, and all requests have to be made over HTTPS.
To authenticate, you need to provide your "API Secret Key" as a username and leave the password blank. Once logged in, you can find your API keys in your account settings. It's critical to keep your "API Secret Key" secure because it allows others to perform privileged operations on your behalf.
EXAMPLE REQUEST
curl https://api.shift4.com/charges \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
Note: adding colon after API key will prevent curl from asking for password
Shift4 API uses HTTP codes to indicate the outcome of an API call. Codes in the 2xx range indicate success, codes in the 4xx range indicate an error on your end (something is wrong with your request), and codes in the 5xx range indicate an error on our end.
If request fails an error object is returned instead of a normal response.
HTTP Status codes
200 OK - Successful request
400 Bad Request - Request has invalid data or is missing a required field
401 Unauthorized - Provided API key is missing or invalid
402 Payment failed - Request was valid but card processing has failed
404 Not Found - Requested object was not found
429 Too Many Requests - Requests hit the API too quickly
500, 502, 503, 504 Server error - Something went wrong on our side
invalid_request
- Request has invalid or missing parameterscard_error
- Card processing has failedgateway_error
- Something went wrong on our siderate_limit_error
- Requests hit the API too quicklytype=card_error
).
Possible values are:invalid_number
- The card number is not a valid one.invalid_expiry_month
- The card's expiration month is invalid.invalid_expiry_year
- The card's expiration year is invalid.invalid_cvc
- Your card's security code is invalid.incorrect_cvc
- The card's security code failed verification.incorrect_zip
- The card's zip code failed verification.expired_card
- The card has expired.insufficient_funds
- The charge amount exceeds the available fund or the card's credit limit.lost_or_stolen
- The card is marked as lost or stolen.suspected_fraud
- The charge is suspected to be fraudulent.limit_exceeded
- You have exceeded the defined limit.card_declined
- The card was declined for another reason.processing_error
- An error occurred while processing the card.blacklisted
- The card has been blacklisted.expired_token
- The token has expired.authentication_required
- The charge requires authentication.do_not_try_again
- The card was declined and should not be retried.currency_not_supported
- Your account is not configured to process the given currency.brand_not_supported
- The card brand is not supported.EXAMPLE ERROR RESPONSE
{
"error" : {
"type" : "card_error",
"code" : "invalid_number",
"message" : "The card number is not a valid one."
}
}
The metadata
attribute on most updatable objects can be used
to store custom pairs of key-value data.
This is useful for storing extra structured information about a specific object. For example, you could save a user login along with a customer object that represents that user.
Each key within a given metadata object must be unique. Each key and value can hold up to 255 characters.
EXAMPLE REQUEST
{
"email" : "[email protected]",
"metadata" : {
"key1" : "value1",
"key2" : "value2"
}
}
EXAMPLE RESPONSE
{
"id" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"created" : 1415810511,
"objectType" : "customer",
"email" : "[email protected]",
"metadata" : {
"key1" : "value1",
"key2" : "value2"
}
}
Charge represents a payment made with a credit or a debit card.
successful
- payment was completed successfullypending
- payment is being processed, see the flow
for details. Possible for payment method charges only.failed
- payment failedredirect
- the client should be redirected to the URL specified in the flow.redirect.redirectUrl
wait
- payment is being processed, wait for flow.nextAction
change.none
nextAction='redirect'
null
if this charge is unrelated to any customer.
null
if no subscription is associated with this charge.
safe
, suspicious
or fraudulent
pending
- 3D Secure was not started or is in progresssuccessful
- 3D Secure was completed successfullyfailed
- 3D Secure is supported, but was not completed successfullynot_possible
- 3D Secure is not supported
frictionless
- Issuer authenticated the customer via the frictionless flow.challenge
- Issuer authenticated the customer by showing a challenge window.full_match
- All address elements matchedpartial_match
- Some address elements matchedno_match
- No address element matchednot_provided
- Address not providedunavailable
- Address verification service was unavailablecode
attribute in the error object.
EXAMPLE OBJECT
{
"id" : "char_ORVCrwOrTkGsDwM3H50OIW7Q",
"created" : 1415810511,
"objectType" : "charge",
"amount" : 499,
"currency" : "USD",
"description" : "Example charge",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"customerId" : null,
"captured" : true,
"refunded" : false,
"refunds" : [],
"disputed" : false,
"metadata" : {}
}
Creates a new charge object.
Capturing a charge object (either at creation or at the later stage) will result in the charge of provided credit or debit card.
If you are in test mode, the provided credit or debit card won't actually be charged, but everything else will work the same as in live mode.
first_recurring
, subsequent_recurring
, merchant_initiated
, customer_initiated
customerId
field)customerId
field)
shift4.js
.
paymentMethod
Successful request returns a charge object that represents the created charge.
DEFINITION
POST https://api.shift4.com/charges
EXAMPLE REQUEST
curl https://api.shift4.com/charges \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "amount=499" \
-d "currency=USD" \
-d "customerId=cust_AoR0wvgntQWRUYMdZNLYMz5R" \
-d "card=tok_NGsyDoJQXop5Pqqi6HizbJTe" \
-d "description=Example charge"
EXAMPLE RESPONSE
{
"id" : "char_ORVCrwOrTkGsDwM3H50OIW7Q",
"created" : 1415810511,
"objectType" : "charge",
"amount" : 499,
"currency" : "USD",
"description" : "Example charge",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"captured" : true,
"refunded" : false,
"disputed" : false,
}
Retrieves an existing charge object.
Successful request returns a charge object.
DEFINITION
GET https://api.shift4.com/charges/{CHARGE_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/charges/char_ORVCrwOrTkGsDwM3H50OIW7Q \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "char_ORVCrwOrTkGsDwM3H50OIW7Q",
"created" : 1415810511,
"objectType" : "charge",
"amount" : 499,
"currency" : "USD",
"description" : "Example charge",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : false
}
Update an existing charge object.
Any not provided parameter will be left unchanged.
paymentMethod
safe
, suspicious
, fraudulent
, in_progress
or unknown
A successful request returns a charge object that was updated.
DEFINITION
POST https://api.shift4.com/charges/{CHARGE_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/charges/char_ORVCrwOrTkGsDwM3H50OIW7Q \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "description=New description"
EXAMPLE RESPONSE
{
"id" : "char_ORVCrwOrTkGsDwM3H50OIW7Q",
"created" : 1415810511,
"objectType" : "charge",
"amount" : 499,
"currency" : "USD",
"description" : "New description",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : false
}
Capture an existing charge that was created with the captured=false
attribute.
This is the second part of two-step payment flow.
A successful request returns a charge object that was captured.
DEFINITION
POST https://api.shift4.com/charges/{CHARGE_ID}/capture
EXAMPLE REQUEST
curl https://api.shift4.com/charges/char_ORVCrwOrTkGsDwM3H50OIW7Q/capture \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-X POST
EXAMPLE RESPONSE
{
"id" : "char_ORVCrwOrTkGsDwM3H50OIW7Q",
"created" : 1415810511,
"objectType" : "charge",
"amount" : 499,
"currency" : "USD",
"description" : "Example charge",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : false
}
List charge objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of charge objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/charges
EXAMPLE REQUEST
curl "https://api.shift4.com/charges?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "char_ORVCrwOrTkGsDwM3H50OIW7Q",
"created" : 1415810511,
"objectType" : "charge",
"amount" : 499,
"currency" : "USD",
"description" : "Example charge",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : false
},
{ ... },
{ ... }
],
"hasMore" : true
}
RETRIEVAL_REQUEST_NEW
RETRIEVAL_REQUEST_REPRESENTED
CHARGEBACK_NEW
CHARGEBACK_REPRESENTED_SUCCESSFULLY
CHARGEBACK_REPRESENTED_UNSUCCESSFULLY
FRAUDULENT
UNRECOGNIZED
DUPLICATE
SUBSCRIPTION_CANCELED
PRODUCT_NOT_RECEIVED
PRODUCT_UNACCEPTABLE
CREDIT_NOT_PROCESSED
GENERAL
EXAMPLE OBJECT
{
"objectType" : "dispute",
"created" : 1415896911,
"updated" : 1415896911,
"status" : "CHARGEBACK_NEW",
"reason" : "GENERAL",
"amount" : 499,
"currency" : "USD",
"acceptedAsLost" : false
}
Refund represents a refund of a charge.
fraudulent
successful, failed
EXAMPLE OBJECT
{
"id" : "re_CNiqwdKHpX3o4SD4PWJxM5CF",
"created" : 1609325894,
"amount" : 100,
"currency" : "USD",
"objectType" : "refund",
"charge" : "char_ZNmWK4pUECfFQTY0N4WMKeh3",
"reason" : "fraudulent",
"status" : "successful"
}
Refund an existing charge, which will result in funds being returned to the previously charged credit or debit card.
Partial refunds are only possible for captured charge. The partial refunds can be repeated for as long as the charge is not fully refunded.
Note that if there is an active subscription related to this charge, it won't be affected by this operation. If you want to cancel a subscription, you must make it in a separate request.
fraudulent
A successful request returns a refund object.
DEFINITION
POST https://api.shift4.com/refunds
EXAMPLE REQUEST
curl https://api.shift4.com/refunds \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "chargeId=char_ZNmWK4pUECfFQTY0N4WMKeh3&amount=499"
EXAMPLE RESPONSE
{
"id" : "re_CNiqwdKHpX3o4SD4PWJxM5CF",
"created" : 1609325894,
"amount" : 100,
"currency" : "USD",
"objectType" : "refund",
"charge" : "char_ZNmWK4pUECfFQTY0N4WMKeh3",
"reason" : "fraudulent",
"status" : "successful"
}
Retrieves an existing refund object.
A successful request returns a refund object.
DEFINITION
GET https://api.shift4.com/refunds/{REFUND_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/refunds/re_CNiqwdKHpX3o4SD4PWJxM5CF \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "re_CNiqwdKHpX3o4SD4PWJxM5CF",
"created" : 1609325894,
"amount" : 100,
"currency" : "USD",
"objectType" : "refund",
"charge" : "char_ZNmWK4pUECfFQTY0N4WMKeh3",
"reason" : "fraudulent",
"status" : "successful"
}
Updates an existing refund object.
A successful request returns a refund object.
DEFINITION
POST https://api.shift4.com/refunds/{REFUND_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/refunds/re_CNiqwdKHpX3o4SD4PWJxM5CF \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d '{"metadata": {"key": "value"}}'
EXAMPLE RESPONSE
{
"id" : "re_CNiqwdKHpX3o4SD4PWJxM5CF",
"created" : 1609325894,
"amount" : 100,
"currency" : "USD",
"objectType" : "refund",
"charge" : "char_ZNmWK4pUECfFQTY0N4WMKeh3",
"reason" : "fraudulent",
"status" : "successful",
"metadata" : {
"key" : "value"
}
}
List refund objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of refund objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/refunds
EXAMPLE REQUEST
curl "https://api.shift4.com/refunds?chargeId=char_ZNmWK4pUECfFQTY0N4WMKeh3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "re_CNiqwdKHpX3o4SD4PWJxM5CF",
"created" : 1609325894,
"amount" : 100,
"currency" : "USD",
"objectType" : "refund",
"charge" : "char_ZNmWK4pUECfFQTY0N4WMKeh3",
"reason" : "fraudulent",
"status" : "successful"
},
{ ... },
{ ... }
],
"hasMore" : true
}
Customers allows to store cards for later use and to perform automatically recurring charges. Customers are also useful for tracking charges that are associated with the same entity.
EXAMPLE OBJECT
{
"id" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"created" : 1415810511,
"objectType" : "customer",
"email" : "[email protected]",
"description" : null,
"defaultCardId" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"cards" : [
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
],
"metadata" : { }
}
Creates a new customer object.
A successful request returns a customer object that represents the created customer.
DEFINITION
POST https://api.shift4.com/customers
EXAMPLE REQUEST
curl https://api.shift4.com/customers \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "[email protected]" \
-d "card=tok_NGsyDoJQXop5Pqqi6HizbJTe"
EXAMPLE RESPONSE
{
"id" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"created" : 1415810511,
"objectType" : "customer",
"email" : "[email protected]",
"defaultCardId" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"cards" : [
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
]
}
Retrieves an existing customer object.
A successful request returns a customer object.
DEFINITION
GET https://api.shift4.com/customers/{CUSTOMER_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/customers/cust_AoR0wvgntQWRUYMdZNLYMz5R \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"created" : 1415810511,
"objectType" : "customer",
"email" : "[email protected]",
"defaultCardId" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"cards" : [
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
]
}
Update an existing customer object.
Any not provided parameter will be left unchanged.
A successful request returns a customer object that was updated.
DEFINITION
POST https://api.shift4.com/customers/{CUSTOMER_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/customers/cust_AoR0wvgntQWRUYMdZNLYMz5R \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "[email protected]" \
-d "description=New description"
EXAMPLE RESPONSE
{
"id" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"created" : 1415810511,
"objectType" : "customer",
"email" : "[email protected]",
"description" : "New description",
"defaultCardId" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"cards" : [
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
]
}
Deletes an existing customer object.
A successful request returns identifier of the deleted customer object.
DEFINITION
DELETE https://api.shift4.com/customers/{CUSTOMER_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/customers/cust_AoR0wvgntQWRUYMdZNLYMz5R \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-X DELETE
EXAMPLE RESPONSE
{
"id" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
}
List customer objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of customer objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/customers
EXAMPLE REQUEST
curl "https://api.shift4.com/customers?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"created" : 1415810511,
"objectType" : "customer",
"email" : "[email protected]",
"defaultCardId" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"cards" : [
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
]
},
{ ... },
{ ... }
],
"hasMore" : false
}
Card represents a credit or a debit card.
Cards are used to save credit or debit card data for later use. Cards can also be used to represent card data in other operations (for example to specify card data when creating a new charge).
Visa
,
American Express
,
MasterCard
,
Discover
,
JCB
,
Diners Club
,
Unknown
Credit Card
,
Debit Card
,
Prepaid Card
,
Unknown
checkFastCredit = true
.
Contains the following attributes:
EXAMPLE OBJECT
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH",
"fastCredit" : {
"supported" : true,
"updated" : 1415811511
}
}
Creates a new card object.
There are three ways to create a new card object:
A successful request returns a card object that represents the created card.
DEFINITION
POST https://api.shift4.com/customers/{CUSTOMER_ID}/cards
EXAMPLE REQUEST
curl https://api.shift4.com/customers/cust_AoR0wvgntQWRUYMdZNLYMz5R/cards \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "id=tok_NGsyDoJQXop5Pqqi6HizbJTe"
EXAMPLE RESPONSE
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
Retrieves an existing card object.
A successful request returns a card object.
DEFINITION
GET https://api.shift4.com/customers/{CUSTOMER_ID}/cards/{CARD_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/customers/cust_AoR0wvgntQWRUYMdZNLYMz5R/cards/card_8P7OWXA5xiTS1ISnyZcum1KV \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
Update an existing card object.
Any not provided parameter will be left unchanged.
A successful request returns a card object that was updated.
DEFINITION
POST https://api.shift4.com/customers/{CUSTOMER_ID}/cards/{CARD_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/customers/cust_AoR0wvgntQWRUYMdZNLYMz5R/cards/card_8P7OWXA5xiTS1ISnyZcum1KV \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "cardholderName=Jane Doe"
-d "checkFastCredit=true"
EXAMPLE RESPONSE
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "Jane Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH",
"fastCredit" : {
"supported" : true,
"updated" : 1415811511
}
}
Deletes an existing card object.
If you delete the card that is the current default card, then the most recently added card will be used as the new default card.
If you delete the last card then teh default card will be set to null
.
A successful request returns the identifier of the deleted card object.
DEFINITION
DELETE https://api.shift4.com/customers/{CUSTOMER_ID}/cards/{CARD_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/customers/cust_AoR0wvgntQWRUYMdZNLYMz5R/cards/card_8P7OWXA5xiTS1ISnyZcum1KV \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-X DELETE
EXAMPLE RESPONSE
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
}
List card objects for a given customer.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of card objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/customers/{CUSTOMER_ID}/cards
EXAMPLE REQUEST
curl "https://api.shift4.com/customers/cust_AoR0wvgntQWRUYMdZNLYMz5R/cards?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
{ ... },
{ ... }
],
"hasMore" : false
}
A subscription represents a recurring payment that will result in a charge being automatically created for a given customer. The frequency and amount of these automatic charges are defined by a plan.
Subscriptions are always billed to the customer's current default card.
amount=100
used in the subscription with
quantity=5
will result in changes with amount=500
.
trialing
- subscription was created from a plan with trial days and is still in the trial periodactive
- subscription is active and will be renewed after the end of a current billing cyclepast_due
- renewing of subscription has failedcanceled
- subscription was manually canceled, or all retry renewal attempts have failedunpaid
- all retry renewal attempts have failedincomplete
- the first charge has failed on subscription creationcreated
, if the subscription plan was changed.
canceledAt
, if the subscription was canceled with
atPeriodEnd=true
.
true
, then the subscription will be canceled at the end of the current billing period.
EXAMPLE OBJECT
{
"id" : "sub_vrEaVmRDW0oKz8ycyy8Yc4l5",
"created" : 1415982733,
"objectType" : "subscription",
"planId" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"quantity" : 1,
"status" : "active",
"remainingBillingCycles" : null,
"start" : 1415982733,
"currentPeriodStart" : 1415982733,
"currentPeriodEnd" : 1416846733,
"canceledAt" : null,
"endedAt" : null,
"trialStart" : null,
"trialEnd" : null,
"cancelAtPeriodEnd" : false,
"metadata" : {}
}
Creates a new subscription object.
A successful request returns a subscription object that represents created subscription.
DEFINITION
POST https://api.shift4.com/subscriptions
EXAMPLE REQUEST
curl https://api.shift4.com/subscriptions \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "planId=plan_bLu3vzO8yhAFhbxFEadm6HUV" \
-d "customerId=cust_AoR0wvgntQWRUYMdZNLYMz5R"
EXAMPLE RESPONSE
{
"id" : "sub_vrEaVmRDW0oKz8ycyy8Yc4l5",
"created" : 1415982733,
"objectType" : "subscription",
"planId" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"quantity" : 1,
"status" : "active",
"start" : 1415982733,
"currentPeriodStart" : 1415982733,
"currentPeriodEnd" : 1416846733,
"cancelAtPeriodEnd" : false
}
Retrieves an existing subscription object.
A successful request returns a subscription object.
DEFINITION
GET https://api.shift4.com/subscriptions/{SUBSCRIPTION_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/subscriptions/sub_vrEaVmRDW0oKz8ycyy8Yc4l5 \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "sub_vrEaVmRDW0oKz8ycyy8Yc4l5",
"created" : 1415982733,
"objectType" : "subscription",
"planId" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"quantity" : 1,
"status" : "active",
"start" : 1415982733,
"currentPeriodStart" : 1415982733,
"currentPeriodEnd" : 1416846733,
"cancelAtPeriodEnd" : false
}
Update an existing subscription object.
Any not provided parameter will be left unchanged.
now
can be used to end the cycle and start a new one immediately.
If subscription is currently in trialing
status, it affects the trial period.
A successful request returns a subscription object that was updated.
DEFINITION
POST https://api.shift4.com/subscriptions/{SUBSCRIPTION_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/subscriptions/sub_vrEaVmRDW0oKz8ycyy8Yc4l5 \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "quantity=5"
EXAMPLE RESPONSE
{
"id" : "sub_vrEaVmRDW0oKz8ycyy8Yc4l5",
"created" : 1415982733,
"objectType" : "subscription",
"planId" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"quantity" : 5,
"status" : "active",
"start" : 1415982733,
"currentPeriodStart" : 1415982733,
"currentPeriodEnd" : 1416846733,
"cancelAtPeriodEnd" : false
}
Cancels an existing subscription.
A successful request returns a subscription object that was canceled.
DEFINITION
DELETE https://api.shift4.com/subscriptions/{SUBSCRIPTION_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/subscriptions/sub_vrEaVmRDW0oKz8ycyy8Yc4l5 \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-X DELETE
EXAMPLE REQUEST (with atPeriodEnd)
curl https://api.shift4.com/subscriptions/sub_vrEaVmRDW0oKz8ycyy8Yc4l5?atPeriodEnd=true \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-X DELETE
EXAMPLE RESPONSE
{
"id" : "sub_vrEaVmRDW0oKz8ycyy8Yc4l5",
"created" : 1415982733,
"objectType" : "subscription",
"planId" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"quantity" : 1,
"status" : "canceled",
"start" : 1415982733,
"currentPeriodStart" : 1415982733,
"currentPeriodEnd" : 1416846733,
"canceledAt" : 1415982979,
"endedAt" : 1415982979,
"cancelAtPeriodEnd" : false
}
Lists subscription objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of subscription objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/subscriptions
EXAMPLE REQUEST
curl "https://api.shift4.com/subscriptions?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "sub_vrEaVmRDW0oKz8ycyy8Yc4l5",
"created" : 1415982733,
"objectType" : "subscription",
"planId" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"quantity" : 1,
"status" : "active",
"start" : 1415982733,
"currentPeriodStart" : 1415982733,
"currentPeriodEnd" : 1416846733,
"cancelAtPeriodEnd" : false
},
{ ... },
{ ... }
],
"hasMore" : true
}
Plan represents an automatically recurring charge.
Plans are used when a subscription is created for a customer to define how often and how much a given customer will be charged.
hour
,
day
,
week
,
month
,
year
interval=day
and intervalCount=10
will result in charge every 10 days.
null
means no limit on number of charges.
billingCycles
)
it will move to plan defined by this attribute.
EXAMPLE OBJECT
{
"id" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"created" : 1415973454,
"objectType" : "plan",
"amount" : 499,
"currency" : "USD",
"interval" : "day",
"intervalCount" : 10,
"billingCycles" : null,
"name" : "Example plan",
"trialPeriodDays" : null,
"recursTo" : null,
"metadata" : {}
}
Creates a new plan object.
hour
,
day
,
week
,
month
,
year
interval=day
and intervalCount=10
will result in a charge every 10 days.
null
means no limit on the number of charges.
billingCycles
)
it will move to the plan defined by this attribute.
A successful request returns a plan object that represents the created plan.
DEFINITION
POST https://api.shift4.com/plans
EXAMPLE REQUEST
curl https://api.shift4.com/plans \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "amount=499" \
-d "currency=USD" \
-d "interval=day" \
-d "intervalCount=10" \
-d "name=Example plan"
EXAMPLE RESPONSE
{
"id" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"created" : 1415973454,
"objectType" : "plan",
"amount" : 499,
"currency" : "USD",
"interval" : "day",
"intervalCount" : 10,
"name" : "Example plan",
"trialPeriodDays" : 0
}
Retrieves an existing plan object.
A successful request returns a plan object.
DEFINITION
GET https://api.shift4.com/plans/{PLAN_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/plans/plan_bLu3vzO8yhAFhbxFEadm6HUV \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"created" : 1415973454,
"objectType" : "plan",
"amount" : 499,
"currency" : "USD",
"interval" : "day",
"intervalCount" : 10,
"name" : "Example plan",
"trialPeriodDays" : 0
}
Update an existing plan object.
Any not provided parameter will be left unchanged.
Changing amount
or currency
of a plan
will only affect future rebills of all subscriptions that are using this plan.
A successful request returns a plan object that was updated.
DEFINITION
POST https://api.shift4.com/plans/{PLAN_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/plans/plan_bLu3vzO8yhAFhbxFEadm6HUV \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "name=New plan"
EXAMPLE RESPONSE
{
"id" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"created" : 1415973454,
"objectType" : "plan",
"amount" : 499,
"currency" : "USD",
"interval" : "day",
"intervalCount" : 10,
"name" : "New plan",
"trialPeriodDays" : 0
}
Deletes an existing plan object.
Note that when you delete a plan, the existing subscriptions will continue to be charged until they are canceled.
A successful request returns identifier of the deleted plan object.
DEFINITION
DELETE https://api.shift4.com/plans/{PLAN_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/plans/plan_bLu3vzO8yhAFhbxFEadm6HUV \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-X DELETE
EXAMPLE RESPONSE
{
"id" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
}
List plan objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of plan objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/plans
EXAMPLE REQUEST
curl "https://api.shift4.com/plans?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "plan_bLu3vzO8yhAFhbxFEadm6HUV",
"created" : 1415973454,
"objectType" : "plan",
"amount" : 499,
"currency" : "USD",
"interval" : "day",
"intervalCount" : 10,
"name" : "Example plan",
"trialPeriodDays" : 0
},
{ ... },
{ ... }
],
"hasMore" : true
}
Events can be used to get notifications when something interesting has happened.
For example, the creation of a new successful charge will result in CHARGE_SUCCEEDED
event.
We provide API methods to retrieve a single event and to list events. It is also possible to get notifications about the new events by using Webhooks.
type=CHARGE_SUCCEEDED
will have a charge object as the value of this attribute.
EXAMPLE OBJECT
{
"id" : "event_EY7CzyQiffJykW8rC5wSRnAj",
"created" : 1416305114,
"objectType" : "event",
"type" : "CHARGE_SUCCEEDED",
"data" : {
"id" : "char_ORVCrwOrTkGsDwM3H50OIW7Q",
"created" : 1415810511,
"objectType" : "charge",
"amount" : 499,
"currency" : "USD",
"description" : "Example charge",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : false
},
"log" : "log_2KzhaJZBmylL40iGiHfZsKRm"
}
Retrieves an existing event object.
A successful request returns an event object.
DEFINITION
GET https://api.shift4.com/events/{EVENT_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/events/event_EY7CzyQiffJykW8rC5wSRnAj \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "event_EY7CzyQiffJykW8rC5wSRnAj",
"created" : 1416305114,
"objectType" : "event",
"type" : "CHARGE_SUCCEEDED",
"data" : {
"id" : "char_ORVCrwOrTkGsDwM3H50OIW7Q",
"created" : 1415810511,
"objectType" : "charge",
"amount" : 499,
"currency" : "USD",
"description" : "Example charge",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : false
},
"log" : "log_2KzhaJZBmylL40iGiHfZsKRm"
}
List event objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of event objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/events
EXAMPLE REQUEST
curl "https://api.shift4.com/events?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "event_EY7CzyQiffJykW8rC5wSRnAj",
"created" : 1416305114,
"objectType" : "event",
"type" : "CHARGE_SUCCEEDED",
"data" : {
"id" : "char_ORVCrwOrTkGsDwM3H50OIW7Q",
"created" : 1415810511,
"objectType" : "charge",
"amount" : 499,
"currency" : "USD",
"description" : "Example charge",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : false
},
"log" : "log_2KzhaJZBmylL40iGiHfZsKRm"
},
{ ... },
{ ... }
],
"hasMore" : true
}
CHARGE_SUCCEEDED
a charge object
CHARGE_PENDING
a charge object
CHARGE_FAILED
a charge object
CHARGE_UPDATED
a charge object
CHARGE_CAPTURED
a charge object
CHARGE_REFUNDED
a charge object
CHARGE_DISPUTE_CREATED
a charge object
CHARGE_DISPUTE_UPDATED
a charge object
CHARGE_DISPUTE_WON
a charge object
CHARGE_DISPUTE_LOST
a charge object
CHARGE_DISPUTE_FUNDS_WITHDRAWN
a charge object
CHARGE_DISPUTE_FUNDS_RESTORED
a charge object
CUSTOMER_CREATED
a customer object
CUSTOMER_UPDATED
a customer object
CUSTOMER_DELETED
a customer object
CUSTOMER_CARD_CREATED
a card object
CUSTOMER_CARD_UPDATED
a card object
CUSTOMER_CARD_DELETED
a card object
CUSTOMER_SUBSCRIPTION_CREATED
a subscription object
CUSTOMER_SUBSCRIPTION_UPDATED
a subscription object
CUSTOMER_SUBSCRIPTION_DELETED
a subscription object
PLAN_CREATED
a plan object
PLAN_UPDATED
a plan object
PLAN_DELETED
a plan object
CREDIT_SUCCEEDED
a credit object
CREDIT_FAILED
a credit object
CREDIT_UPDATED
a credit object
FRAUD_WARNING_CREATED
a fraud warning object
FRAUD_WARNING_UPDATED
a fraud warning object
PAYOUT_CREATED
a payout object
PAYOUT_UPDATED
a payout object
Tokens are used to represent a card in a situation where you don't want to process or store card-sensitive data on your servers. Tokens can be easily created directly in a browser with the use of Components, but you can also create tokens in other environments (for example, in mobile applications).
Tokens can be created with the use of either "API Public Key" or "API Secret Key". You can safely embed your "API Public Key" in JavaScript or in downloadable applications (like iPhone or Android apps), so you can easily create tokens directly from these applications.
Note that tokens are meant to be used as a temporary representation of card data, and each token can be used only once. You should not store tokens for long periods of time - if you want to store a card for later use you should use the token to either create new customer or add new card to the existing customer.
Visa
,
American Express
,
MasterCard
,
Discover
,
JCB
,
Diners Club
,
Unknown
Credit Card
,
Debit Card
,
Prepaid Card
,
Unknown
pending
- 3D Secure was not started or is in progresssuccessful
- 3D Secure was completed successfullyfailed
- 3D Secure is supported, but was not completed successfullynot_possible
- 3D Secure is not supported
frictionless
- Issuer authenticated the customer via the frictionless flow.challenge
- Issuer authenticated the customer by showing a challenge window.EXAMPLE OBJECT
{
"id" : "tok_NGsyDoJQXop5Pqqi6HizbJTe",
"created" : 1415810511,
"objectType" : "token",
"first6" : "42424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"brand" : "Visa",
"type" : "Credit Card",
"country" : "CH",
"used" : true,
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
}
Creates a new token object.
This method can be called with either "API Public Key" or "API Secret Key".
Successful request returns a token object that represents given card details.
DEFINITION
POST https://api.shift4.com/tokens
EXAMPLE REQUEST
curl https://api.shift4.com/tokens \
-u pu_test_WVMFC9GFuvm54b0uorifKkCh: \
-d "number=4242424242424242" \
-d "expMonth=11" \
-d "expYear=2027" \
-d "cvc=123" \
-d "cardholderName=John Doe"
EXAMPLE RESPONSE
{
"id" : "tok_NGsyDoJQXop5Pqqi6HizbJTe",
"created" : 1415810511,
"objectType" : "token",
"first6" : "42424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"brand" : "Visa",
"type" : "Credit Card",
"country" : "CH",
"used" : false
}
Retrieves an existing token object.
A successful request returns a token object.
DEFINITION
GET https://api.shift4.com/tokens/{TOKEN_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/tokens/tok_NGsyDoJQXop5Pqqi6HizbJTe \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "tok_NGsyDoJQXop5Pqqi6HizbJTe",
"created" : 1415810511,
"objectType" : "token",
"first6" : "42424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"brand" : "Visa",
"type" : "Credit Card",
"country" : "CH",
"used" : false
}
Initialize a new 3D Secure authentication process.
Generally (apart from a few specialized use cases) it is not recommended to initialize 3D Secure from the API. You should use our Components or checkout integration that already supports 3D Secure authentication.
To complete the 3D Secure process initiated using this API call, you must:
enrolled
filed in response is equal to true
redirectUrl
or display that URL in an <iframe> tag.returnUrl
token
to create a chargesuccessful
or failed
A successful request returns an object with the following attributes:
DEFINITION
POST https://api.shift4.com/3d-secure
EXAMPLE REQUEST
curl https://api.shift4.com/3d-secure \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "amount=499" \
-d "currency=USD" \
-d "card[number]=4012001800000016" \
-d "card[expMonth]=11" \
-d "card[expYear]=2027" \
-d "card[cvc]=123" \
-d "returnUrl=https://example.com/"
EXAMPLE RESPONSE
{
"enrolled": true,
"version": "2.2.0",
"redirectUrl": "https://api.shift4.com/3d-secure/start/35WSIRL2Qm1JKsDXMohFVhGVj5AFptAhuN7Sa0oQ",
"token": {
"id": "tok_RBZVaNlPj70nNIQ2cIB2lYMI",
"created": 1634561057,
"objectType": "token",
"first6": "401200",
"last4": "0016",
"fingerprint": "8bTF2cbb2ccGr7ws",
"expMonth": "11",
"expYear": "2027",
"brand": "Visa",
"type": "Credit Card",
"country": "CH",
"used": false,
"threeDSecureInfo": {
"amount": 499,
"currency": "USD",
"enrolled": true,
"liabilityShift": "failed",
"version": "2.2.0",
"authenticationFlow": null
}
}
}
Blacklist can be used to block unwanted charges.
Blacklist contains Blacklist Rule objects.
Each such object represents a single condition - if request to create a new charge
matches this condition then it will fail - resulting in error response
with code=blacklisted
.
ruleType=fingerprint
.
ruleType=ip_address
.
ruleType=ip_country
.
ruleType=metadata
.
ruleType=metadata
.
ruleType=email
.
ruleType=user_agent
.
ruleType=accept_language
.
ruleType=card_country
.
ruleType=card_bin
.
ruleType=card_issuer
.
EXAMPLE OBJECT
{
"id" : "blr_O3y7VyxbszuezuDNjuBsExUf",
"created" : 1429282784,
"objectType" : "blacklistRule",
"ruleType" : "fingerprint",
"fingerprint" : "e3d8suyIDgFg3pE7"
}
Creates a new blacklist rule object.
ruleType=fingerprint
.
ruleType=fingerprint
.
If a card number is provided, it will be automatically converted to a fingerprint.
When creating fingerprint
rule then you must provide either a fingerprint or a card number, but not both.
ruleType=ip_address
.
ruleType=ip_country
.
ruleType=metadata
.
ruleType=metadata
.
ruleType=email
.
ruleType=user_agent
.
ruleType=accept_language
.
ruleType=card_country
.
ruleType=card_bin
.
ruleType=card_issuer
.
A successful request returns a blacklist rule object that represents created blacklist rule.
DEFINITION
POST https://api.shift4.com/blacklist
EXAMPLE REQUEST
curl https://api.shift4.com/blacklist \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "ruleType=fingerprint" \
-d "fingerprint=e3d8suyIDgFg3pE7"
EXAMPLE RESPONSE
{
"id" : "blr_O3y7VyxbszuezuDNjuBsExUf",
"created" : 1429282784,
"objectType" : "blacklistRule",
"ruleType" : "fingerprint",
"fingerprint" : "e3d8suyIDgFg3pE7"
}
Retrieves an existing blacklist rule object.
A successful request returns a blacklist Rule object.
DEFINITION
GET https://api.shift4.com/blacklist/{BLACKLIST_RULE_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/blacklist/blr_O3y7VyxbszuezuDNjuBsExUf \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "blr_O3y7VyxbszuezuDNjuBsExUf",
"created" : 1429282784,
"objectType" : "blacklistRule",
"ruleType" : "fingerprint",
"fingerprint" : "e3d8suyIDgFg3pE7"
}
Deletes an existing blacklist rule object.
A successful request returns identifier of a deleted blacklist rule object.
DEFINITION
DELETE https://api.shift4.com/blacklist/{BLACKLIST_RULE_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/blacklist/blr_O3y7VyxbszuezuDNjuBsExUf \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-X DELETE
EXAMPLE RESPONSE
{
"id" : "blr_O3y7VyxbszuezuDNjuBsExUf",
}
Lists blacklist rule objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of blacklist rule objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/blacklist
EXAMPLE REQUEST
curl "https://api.shift4.com/blacklist?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "blr_O3y7VyxbszuezuDNjuBsExUf",
"created" : 1429282784,
"objectType" : "blacklistRule",
"ruleType" : "fingerprint",
"fingerprint" : "e3d8suyIDgFg3pE7"
},
{ ... },
{ ... }
],
"hasMore" : true
}
Checkout Request is used to define an action that will be executed after the customer has provided his card data in Checkout.
Checkout Request can define either a single charge or an automatically recurring subscription. If you already have customer object that represents your customer, you can include its identifier in Checkout Request so that the created charge or subscription will be automatically assigned to that customer. If the identifier of an existing customer is not provided in Checkout Request then a new customer object will be automatically created.
Creating Checkout Request can be done offline (without the need to communicate with Shift4 servers). All you need to do is to sign the Checkout Request object with your secret key - see signing a Checkout Request.
min
and max
attributes that defines a valid range
for the custom amount that is provided by the customer.
amountOptions
attribute will cause Checkout to have buttons
with predefined amounts from which the customer will be able to choose.
Providing customAmount
attribute will cause Checkout to have the input field
where the customer can type any amount (but that amount must be within specified min/max range).
Providing both of these attributes at the same time will cause Checkout to have
both options - buttons with predefined amounts and the input field to provide any custom amount.
EXAMPLE CHECKOUT REQUEST (with charge)
{
"charge" : {
"amount" : 499,
"currency" : "USD"
},
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"rememberMe" : true
}
EXAMPLE CHECKOUT REQUEST (with subscription)
{
"subscription" : {
"planId" : "plan_bLu3vzO8yhAFhbxFEadm6HUV"
},
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"rememberMe" : true
}
EXAMPLE CHECKOUT REQUEST (with custom charge)
{
"customCharge" : {
"amountOptions" : [100, 200, 500, 1000, 2000],
"customAmount" : {
"min" : 100,
"max" : 5000
},
"currency":"USD"
},
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"rememberMe" : true
}
Checkout Request signature is created using HMAC with SHA256 using Checkout Request JSON and your secret key.
A signed Checkout Request is created by concatenating the signature, pipe character (|
),
and Checkout Request JSON and then encoding it with BASE64.
The complete formula for signing Checkout Request:
$signed_checkout_request = base64( hmac_sha256( $checkout_request, $private_key ) + "|" + $checkout_request )
EXAMPLE SIGNING
export checkout_request='{"charge":{"amount":499,"currency":"USD"}}'
export signature=`echo -n "$checkout_request" | openssl dgst -sha256 -hmac 'pr_test_tXHm9qV9qV9bjIRHcQr9PLPa' | sed 's/^.* //'`
echo -n "$signature|$checkout_request" | base64
EXAMPLE SIGNED CHECKOUT REQUEST
ODViMmQ1NWEwYmNkZmMxZTI5ZTAwOGYzZDdlODhhYmRkNGQzOGUyMjE4NjU4NjA2MjkzYjk1ZDA2ZWNkMzk4Y3x7ImNoYXJnZSI6eyJhbW91bnQiOjQ5OSwiY3VycmVuY3kiOiJVU0QifX0=
Credit represents funds transferred to a card.
This feature is available for selected business models only. Please contact [email protected] to find out more.
null
if this credit is not associated with any customer.
pending
- 3D Secure was not started or is in progresssuccessful
- 3D Secure was completed successfullyfailed
- 3D Secure is supported, but was not completed successfullynot_possible
- 3D Secure is not supported
frictionless
- Issuer authenticated the customer via the frictionless flow.challenge
- Issuer authenticated the customer by showing a challenge window.code
attribute in error object.
EXAMPLE OBJECT
{
"id" : "cr_OwM7B3WWha5SIfjNSw2eUqVb",
"created" : 1415810511,
"objectType" : "credit",
"amount" : 499,
"currency" : "USD",
"description" : "Example credit",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH",
"fastCredit" : {
"supported" : true,
"updated" : 1415811511
}
},
"customerId" : null,
"fast" : true,
"metadata" : {}
}
Creates a new credit object.
If you are in test mode, then provided card won't receive any funds, although everything else will work the same as in live mode.
This feature is available for selected business models only. Please contact [email protected] to find out more.
customerId
field)
A successful request returns a credit object that represents the created credit.
DEFINITION
POST https://api.shift4.com/credits
EXAMPLE REQUEST
curl https://api.shift4.com/credits \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "amount=499" \
-d "currency=USD" \
-d "customerId=cust_AoR0wvgntQWRUYMdZNLYMz5R" \
-d "card=tok_NGsyDoJQXop5Pqqi6HizbJTe" \
-d "description=Example credit"
EXAMPLE RESPONSE
{
"id" : "cr_OwM7B3WWha5SIfjNSw2eUqVb",
"created" : 1415810511,
"objectType" : "credit",
"amount" : 499,
"currency" : "USD",
"description" : "Example credit",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R"
}
Retrieves an existing credit object.
This feature is available for selected business models only. Please contact [email protected] to find out more.
A successful request returns a credit object.
DEFINITION
GET https://api.shift4.com/credits/{CREDIT_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/credits/cr_OwM7B3WWha5SIfjNSw2eUqVb \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "cr_OwM7B3WWha5SIfjNSw2eUqVb",
"created" : 1415810511,
"objectType" : "credit",
"amount" : 499,
"currency" : "USD",
"description" : "Example credit",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
}
Update an existing credit object.
Any not provided parameter will be left unchanged.
This feature is available for selected business models only. Please contact [email protected] to find out more.
A successful request returns a credit object that was updated.
DEFINITION
POST https://api.shift4.com/credits/{CREDIT_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/credits/cr_OwM7B3WWha5SIfjNSw2eUqVb \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "description=New description"
EXAMPLE RESPONSE
{
"id" : "cr_OwM7B3WWha5SIfjNSw2eUqVb",
"created" : 1415810511,
"objectType" : "credit",
"amount" : 499,
"currency" : "USD",
"description" : "New description",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
}
List credit objects.
This feature is available for selected business models only. Please contact [email protected] to find out more.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of credit objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/credits
EXAMPLE REQUEST
curl "https://api.shift4.com/credits?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "cr_OwM7B3WWha5SIfjNSw2eUqVb",
"created" : 1415810511,
"objectType" : "credit",
"amount" : 499,
"currency" : "USD",
"description" : "Example credit",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
}
},
{ ... },
{ ... }
],
"hasMore" : true
}
Dispute is created when a customer questions your charge with their bank or the credit card company. When this happens, you have an opportunity to respond by providing evidence that the charge is legitimate.
RETRIEVAL_REQUEST_NEW
- retrieval request, response neededRETRIEVAL_REQUEST_RESPONSE_UNDER_REVIEW
- retrieval request, response under reviewRETRIEVAL_REQUEST_REPRESENTED
- retrieval request, successfully representedCHARGEBACK_NEW
- chargeback, response neededCHARGEBACK_RESPONSE_UNDER_REVIEW
- chargeback, response under reviewCHARGEBACK_REPRESENTED_SUCCESSFULLY
- chargeback, dispute wonCHARGEBACK_REPRESENTED_UNSUCCESSFULLY
- chargeback, dispute lostFRAUDULENT
,
UNRECOGNIZED
,
DUPLICATE
,
SUBSCRIPTION_CANCELED
,
PRODUCT_NOT_RECEIVED
,
PRODUCT_UNACCEPTABLE
,
CREDIT_NOT_PROCESSED
,
GENERAL
EXAMPLE RESPONSE
{
"id" : "disp_GOqyiOF9575FUYMZ73gjNrcY",
"created" : 1489571590,
"objectType" : "dispute",
"updated" : 1489571590,
"amount" : 1000,
"currency" : "USD",
"status" : "CHARGEBACK_NEW",
"reason" : "GENERAL",
"acceptedAsLost" : false,
"charge" : {
"id" : "char_wPLWar517f4YeEhlLwxGs8u6",
"created" : 1489571590,
"objectType" : "charge",
"amount" : 0,
"currency" : "USD",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : true
},
"evidence" : {
"productDescription" : "Exclusive black shoes",
"customer_communication" : "file_2nayTQXBBjaVEPVtCwGCbqOj"
},
"evidenceDetails" : {
"hasEvidence" : true,
"submissionCount" : 1
}
}
EXAMPLE RESPONSE
{
"productDescription" : null,
"customerName" : null,
"customerEmail" : null,
"customerPurchaseIp" : null,
"customerSignature" : null,
"billingAddress" : null,
"receipt" : null,
"customerCommunication" : null,
"serviceDate" : null,
"serviceDocumentation" : null,
"duplicateChargeId" : null,
"duplicateChargeDocumentation" : null,
"duplicateChargeExplanation" : null,
"refundPolicy" : null,
"refundPolicyDisclosure" : null,
"refundRefusalExplanation" : null,
"cancellationPolicy" : null,
"cancellationPolicyDisclosure" : null,
"cancellationRefusalExplanation" : null,
"accessActivityLogs" : null,
"shippingAddress" : null,
"shippingDate" : null,
"shippingCarrier" : null,
"shippingTrackingNumber" : null,
"shippingDocumentation" : null,
"uncategorizedText" : null,
"uncategorizedFile" : null
}
Retrieves an existing dispute object.
A successful request returns a dispute object.
DEFINITION
GET https://api.shift4.com/disputes/{DISPUTE_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/disputes/disp_2nayTQXBBjaVEPVtCwGCbqOj \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "disp_GOqyiOF9575FUYMZ73gjNrcY",
"created" : 1489571590,
"objectType" : "dispute",
"updated" : 1489571590,
"amount" : 1000,
"currency" : "USD",
"status" : "CHARGEBACK_NEW",
"reason" : "GENERAL",
"acceptedAsLost" : false,
"charge" : {
"id" : "char_wPLWar517f4YeEhlLwxGs8u6",
"created" : 1489571590,
"objectType" : "charge",
"amount" : 0,
"currency" : "USD",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : true
},
"evidence" : {
"productDescription" : "Exclusive black shoes",
"customer_communication" : "file_2nayTQXBBjaVEPVtCwGCbqOj"
},
"evidenceDetails" : {
"hasEvidence" : true,
"submissionCount" : 1
}
}
Updates an existing dispute object.
Any not provided parameter will be left unchanged.
submit=false
is specified.
Can have following attributes:
Size sum of all file uploads in evidence cannot exceed 8,2MB.
Successful request returns a dispute object.
DEFINITION
POST https://api.shift4.com/disputes/{DISPUTE_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/disputes/disp_2nayTQXBBjaVEPVtCwGCbqOj \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d "evidence[productDescription]=Exclusive black shoes" \
-d "evidence[customerCommunication]=file_2nayTQXBBjaVEPVtCwGCbqOj"
EXAMPLE RESPONSE
{
"id" : "disp_GOqyiOF9575FUYMZ73gjNrcY",
"created" : 1489571590,
"objectType" : "dispute",
"updated" : 1489571590,
"amount" : 1000,
"currency" : "USD",
"status" : "CHARGEBACK_NEW",
"reason" : "GENERAL",
"acceptedAsLost" : false,
"charge" : {
"id" : "char_wPLWar517f4YeEhlLwxGs8u6",
"created" : 1489571590,
"objectType" : "charge",
"amount" : 0,
"currency" : "USD",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : true
},
"evidence" : {
"productDescription" : "Exclusive black shoes",
"customer_communication" : "file_2nayTQXBBjaVEPVtCwGCbqOj"
},
"evidenceDetails" : {
"hasEvidence" : true,
"submissionCount" : 1
}
}
Closing the dispute indicates that you do not want to submit any further evidence and acknowledge it as lost.
A successful request returns identifier of the closed dispute object.
DEFINITION
POST https://api.shift4.com/disputes/{DISPUTE_ID}/close
EXAMPLE REQUEST
curl https://api.shift4.com/disputes/disp_2nayTQXBBjaVEPVtCwGCbqOj/close \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-X POST
EXAMPLE RESPONSE
{
"id" : "disp_GOqyiOF9575FUYMZ73gjNrcY",
"created" : 1489571590,
"objectType" : "dispute",
"updated" : 1489571590,
"amount" : 1000,
"currency" : "USD",
"status" : "CHARGEBACK_NEW",
"reason" : "GENERAL",
"acceptedAsLost" : false,
"charge" : {
"id" : "char_wPLWar517f4YeEhlLwxGs8u6",
"created" : 1489571590,
"objectType" : "charge",
"amount" : 0,
"currency" : "USD",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : true
},
"evidence" : {
"productDescription" : "Exclusive black shoes",
"customer_communication" : "file_2nayTQXBBjaVEPVtCwGCbqOj"
},
"evidenceDetails" : {
"hasEvidence" : true,
"submissionCount" : 1
}
}
Lists dispute objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns list of a dispute object.
DEFINITION
GET https://api.shift4.com/disputes
EXAMPLE REQUEST
curl https://api.shift4.com/disputes \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list": [{
"id" : "disp_GOqyiOF9575FUYMZ73gjNrcY",
"created" : 1489571590,
"objectType" : "dispute",
"updated" : 1489571590,
"amount" : 1000,
"currency" : "USD",
"status" : "CHARGEBACK_NEW",
"reason" : "GENERAL",
"acceptedAsLost" : false,
"charge" : {
"id" : "char_wPLWar517f4YeEhlLwxGs8u6",
"created" : 1489571590,
"objectType" : "charge",
"amount" : 0,
"currency" : "USD",
"card" : {
"id" : "card_8P7OWXA5xiTS1ISnyZcum1KV",
"created" : 1415810511,
"objectType" : "card",
"first6" : "424242",
"last4" : "4242",
"fingerprint" : "e3d8suyIDgFg3pE7",
"expMonth" : "11",
"expYear" : "2027",
"cardholderName" : "John Doe",
"customerId" : "cust_AoR0wvgntQWRUYMdZNLYMz5R",
"brand" : "Visa",
"type" : "Credit Card",
"issuer" : "Card Issuer Name",
"country" : "CH"
},
"captured" : true,
"refunded" : false,
"disputed" : true
},
"evidence" : {
"productDescription" : "Exclusive black shoes",
"customer_communication" : "file_2nayTQXBBjaVEPVtCwGCbqOj"
},
"evidenceDetails" : {
"hasEvidence" : true,
"submissionCount" : 1
}
}]
}
File Upload objects are created by uploading a binary file (like an image or PDF document) to Shift4. Such an uploaded file can then be used in other API requests by providing its identifier.
Note that for the file upload API a different API endpoint must be used: https://uploads.api.shift4.com.
dispute_evidence
.
pdf
, jpg
, png
.
EXAMPLE RESPONSE
{
"id" : "file_2nayTQXBBjaVEPVtCwGCbqOj",
"created" : 1415810511,
"objectType" : "file_upload",
"purpose" : "dispute_evidence",
"size" : 28461,
"type" : "jpg"
}
Creates a new file upload object.
dispute_evidence
A successful request returns a file upload object that represents the uploaded file.
DEFINITION
POST https://uploads.api.shift4.com/files
EXAMPLE REQUEST
curl https://uploads.api.shift4.com/files \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-F "purpose=dispute_evidence" \
-F file="@example-file.jpg"
EXAMPLE RESPONSE
{
"id" : "file_2nayTQXBBjaVEPVtCwGCbqOj",
"created" : 1415810511,
"objectType" : "file_upload",
"purpose" : "dispute_evidence",
"size" : 28461,
"type" : "jpg"
}
Retrieves an existing file upload object.
A successful request returns a file upload object.
DEFINITION
GET https://uploads.api.shift4.com/files/{FILE_UPLOAD_ID}
EXAMPLE REQUEST
curl https://uploads.api.shift4.com/files/file_2nayTQXBBjaVEPVtCwGCbqOj
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "file_2nayTQXBBjaVEPVtCwGCbqOj",
"created" : 1415810511,
"objectType" : "file_upload",
"purpose" : "dispute_evidence",
"size" : 28461,
"type" : "jpg"
}
Lists file upload objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns the list of a file upload object.
DEFINITION
GET https://uploads.api.shift4.com/files
EXAMPLE REQUEST
curl https://uploads.api.shift4.com/files?limit=2
EXAMPLE RESPONSE
{
"hasMore": false,
"list": [{
"id" : "file_2nayTQXBBjaVEPVtCwGCbqOj",
"created" : 1415810511,
"objectType" : "file_upload",
"purpose" : "dispute_evidence",
"size" : 28461,
"type" : "jpg"
}]
}
Fraud Warning represents information received from the card issuer regarding the charge.
EXAMPLE OBJECT
{
"id" : "fw_O7FRMgfC5g9BFqjEFepcB07J",
"created" : 1609325894,
"objectType" : "fraud_warning",
"charge" : "char_ZNmWK4pUECfFQTY0N4WMKeh3",
"actionable" : true
}
Retrieves an existing fraud warning object.
A successful request returns a fraud warning object.
DEFINITION
GET https://api.shift4.com/fraud-warnings/{FRAUD_WARNING_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/fraud-warnings/fw_O7FRMgfC5g9BFqjEFepcB07J \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "fw_O7FRMgfC5g9BFqjEFepcB07J",
"created" : 1609325894,
"objectType" : "fraud_warning",
"charge" : "char_ZNmWK4pUECfFQTY0N4WMKeh3",
"actionable" : true
}
Lists fraud warning objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of fraud-warning objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/fraud-warnings
EXAMPLE REQUEST
curl "https://api.shift4.com/fraud-warnings" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "fw_O7FRMgfC5g9BFqjEFepcB07J",
"created" : 1609325894,
"objectType" : "fraud_warning",
"charge" : "char_ZNmWK4pUECfFQTY0N4WMKeh3",
"actionable" : true
},
{ ... },
{ ... }
],
"hasMore" : true
}
Payout represents details of funds received from the acquirer. They are made on varying schedules, depending on your acquirer.
EXAMPLE OBJECT
{
"id" : "po_bLu3vzO8yhAFhbxFEadm6HUV",
"created" : 1413561422,
"objectType" : "payout",
"periodEnd" : 1413325441,
"periodStart" : 1413012367,
"amount" : 499,
"currency" : "USD"
}
Retrieves an existing payout object.
A successful request returns a payout object.
DEFINITION
GET https://api.shift4.com/payouts/{PAYOUT_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/payouts/po_bLu3vzO8yhAFhbxFEadm6HUV \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "po_bLu3vzO8yhAFhbxFEadm6HUV",
"created" : 1413561422,
"objectType" : "payout",
"periodEnd" : 1413325441,
"periodStart" : 1413012367,
"amount" : 499,
"currency" : "USD"
}
Lists payout objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of payout objects.
Results are sorted by payout date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/payouts
EXAMPLE REQUEST
curl "https://api.shift4.com/payouts?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "po_bLu3vzO8yhAFhbxFEadm6HUV",
"created" : 1413561422,
"objectType" : "payout",
"periodEnd" : 1413325441,
"periodStart" : 1413012367,
"amount" : 499,
"currency" : "USD"
},
{ ... },
{ ... }
],
"hasMore" : true
}
charge
, refund
, credit
, chargeback
, chargeback_represented
, reserve_withhold
, reserve_release
, acquirer_fee
or adjustment
.
EXAMPLE OBJECT
{
"id" : "pot_Y8x0X5d5zoRj6uI26vibFwkz",
"created" : 1604620800,
"objectType" : "payout_transaction",
"type" : "charge",
"amount" : 413,
"currency" : "USD",
"fee" : 39,
"source" : "char_1jmzPboimq0IDwz8zLXdX9qw",
"payout" : "po_gb48tN1UdWznKQHexcAAlbkK"
}
List payout transaction objects.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of payout transaction objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/payout-transactions
EXAMPLE REQUEST
curl "https://api.shift4.com/payout-transactions?payout=po_gb48tN1UdWznKQHexcAAlbkK" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "pot_Y8x0X5d5zoRj6uI26vibFwkz",
"created" : 1604620800,
"objectType" : "payout_transaction",
"type" : "charge",
"amount" : 413,
"currency" : "USD",
"fee" : 39,
"source" : "char_1jmzPboimq0IDwz8zLXdX9qw",
"payout" : "po_gb48tN1UdWznKQHexcAAlbkK"
},
{ ... },
{ ... }
],
"hasMore" : true
}
Creates test Payout based on test mode charges, refunds, chargebacks and credits.
A successful request returns payout object.
DEFINITION
POST https://api.shift4.com/payouts
EXAMPLE REQUEST
curl -X POST "https://api.shift4.com/payouts" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "po_bLu3vzO8yhAFhbxFEadm6HUV",
"created" : 1413561422,
"objectType" : "payout",
"periodEnd" : 1413325441,
"periodStart" : 1413012367,
"amount" : 499,
"currency" : "USD"
}
Payment Method represents an alternative payment method different from the card payments.
Payment Methods object can be used to define details of the payment method that will be used during payments.
alipay
apple_pay
bancontact
bitpay
blik
boleto
eps
estonianbanks
google_pay
ideal
latvianbanks
lithuanianbanks
maxima
multibanco
mybank
p24
paypost
paysafecard
paysafecash
paysera
payu
perlas
skrill
three_d_secure
trustly
unionpay
verkkopankki
wechatpay
chargeable
- Payment Method is ready to be used to create a charge.pending
- Payment Method setup process is in progress.failed
- setup process of the Payment Method failed.used
- payment method was already charged and cannot be reused.apple_pay
. Can contain the following attributes:
Visa
,American Express
,MasterCard
,Discover
,JCB
,Diners Club
,Unknown
Credit Card
,Debit Card
,Unknown
google_pay
. Can contain the following attributes:
Visa
,American Express
,MasterCard
,Discover
,JCB
,Diners Club
,Unknown
Credit Card
,Debit Card
,Unknown
three_d_secure
Payment Method.
At the moment only supported source is Payment Method of type google_pay
.
three_d_secure
- three_d_secure has to be perform on this Payment Method
none
EXAMPLE OBJECT
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "alipay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CN"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "apple_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"applePay" : {
"first6" : "424242",
"last4" : "4242",
"amount" : 1000,
"currency" : "USD"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "bancontact",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "BE"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "bitpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "blik",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "PL"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "boleto",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "BR"
},
"vat" : "999.999.999-99",
"email" : "[email protected]"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "eps",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "estonianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "EE"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "google_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"googlePay" : {
"cardBrand" : "Visa",
"cardType" : "Debit Card",
"first6" : "424242",
"last4" : "4242"
},
"flow" : {
"nextAction" : "none"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "ideal",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "NL"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "latvianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LV"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "lithuanianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "maxima",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "multibanco",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "PT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "mybank",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "IT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "p24",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "PL"
},
"email" : "[email protected]"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paypost",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysafecard",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysafecash",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysera",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "EE"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "payu",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CZ"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "perlas",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "skrill",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "three_d_secure",
"status" : "pending",
"billing" : {
"address" : {
"country" : "US"
}
},
"threeDSecure" : {
"amount" : 1000,
"currency" : "USD"
},
"source" : {
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "google_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"googlePay" : {
"cardBrand" : "Visa",
"cardType" : "Debit Card",
"first6" : "424242",
"last4" : "4242"
},
"flow" : {
"nextAction" : "none"
}
},
"flow" : {
"nextAction" : "three_d_secure"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "trustly",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "unionpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
},
"email" : "[email protected]"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "verkkopankki",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "FI"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "wechatpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CN"
}
}
}
Creates a new payment method object.
alipay
apple_pay
bancontact
bitpay
blik
boleto
eps
estonianbanks
google_pay
ideal
latvianbanks
lithuanianbanks
maxima
multibanco
mybank
p24
paypost
paysafecard
paysafecash
paysera
payu
perlas
skrill
three_d_secure
trustly
unionpay
verkkopankki
wechatpay
apple_pay
. Can contain the following attributes:
google_pay
. Can contain the following attributes:
three_d_secure
. Can contain the following attributes:
google_pay
ach.verificationProvider=none
)
- IP address of the user
A successful request returns a payment method object that represents the created payment method.
DEFINITION
POST https://api.shift4.com/payment-methods
EXAMPLE REQUEST
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=alipay' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=CN' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=apple_pay' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=US' \
-d 'applePay.token={ "data": "TEST_TOKEN:1000USD" }'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=bancontact' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=BE'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=bitpay' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=US' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=blik' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=PL' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=boleto' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=BR' \
-d 'billing.name=Werner Heisenberg' \
-d '[email protected]' \
-d 'billing.vat=999.999.999-99'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=eps' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=AT'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=estonianbanks' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=EE' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=google_pay' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=US' \
-d 'googlePay.token=PAN_ONLY'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=ideal' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=NL'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=latvianbanks' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=LV' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=lithuanianbanks' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=LT' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=maxima' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=LT' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=multibanco' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=PT' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=mybank' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=IT' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=p24' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=PL' \
-d '[email protected]'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=paypost' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=LT' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=paysafecard' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=AT' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=paysafecash' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=AT' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=paysera' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=EE' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=payu' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=CZ' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=perlas' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=LT' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=skrill' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=US' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=three_d_secure' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=US' \
-d 'source=pm_aokF87jdbkjCADkihesRk1kX' \
-d 'threeDSecure.amount=1000' \
-d 'threeDSecure.currency=USD'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=trustly' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=AT' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=unionpay' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=US' \
-d 'billing.name=Werner Heisenberg' \
-d '[email protected]'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=verkkopankki' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=FI' \
-d 'billing.name=Werner Heisenberg'
curl -X POST 'https://api.shift4.com/payment-methods' \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-d 'type=wechatpay' \
-d 'customerId=cust_BokS87jDShjASDkjhdsak4kl' \
-d 'billing.address.country=CN' \
-d 'billing.name=Werner Heisenberg'
EXAMPLE RESPONSE
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "alipay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CN"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "apple_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"applePay" : {
"first6" : "424242",
"last4" : "4242",
"amount" : 1000,
"currency" : "USD"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "bancontact",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "BE"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "bitpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "blik",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "PL"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "boleto",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "BR"
},
"vat" : "999.999.999-99",
"email" : "[email protected]"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "eps",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "estonianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "EE"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "google_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"googlePay" : {
"cardBrand" : "Visa",
"cardType" : "Debit Card",
"first6" : "424242",
"last4" : "4242"
},
"flow" : {
"nextAction" : "none"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "ideal",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "NL"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "latvianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LV"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "lithuanianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "maxima",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "multibanco",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "PT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "mybank",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "IT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "p24",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "PL"
},
"email" : "[email protected]"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paypost",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysafecard",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysafecash",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysera",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "EE"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "payu",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CZ"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "perlas",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "skrill",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "three_d_secure",
"status" : "pending",
"billing" : {
"address" : {
"country" : "US"
}
},
"threeDSecure" : {
"amount" : 1000,
"currency" : "USD"
},
"source" : {
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "google_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"googlePay" : {
"cardBrand" : "Visa",
"cardType" : "Debit Card",
"first6" : "424242",
"last4" : "4242"
},
"flow" : {
"nextAction" : "none"
}
},
"flow" : {
"nextAction" : "three_d_secure"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "trustly",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "unionpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
},
"email" : "[email protected]"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "verkkopankki",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "FI"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "wechatpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CN"
}
}
}
Retrieves an existing payment method object.
A successful request returns a payment method object.
DEFINITION
GET https://api.shift4.com/payment-methods/{PAYMENT_METHOD_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/payment-methods/pm_8HeqP7ZurLKhBPknC5e6sR85 \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "alipay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CN"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "apple_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"applePay" : {
"first6" : "424242",
"last4" : "4242",
"amount" : 1000,
"currency" : "USD"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "bancontact",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "BE"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "bitpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "blik",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "PL"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "boleto",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "BR"
},
"vat" : "999.999.999-99",
"email" : "[email protected]"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "eps",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "estonianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "EE"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "google_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"googlePay" : {
"cardBrand" : "Visa",
"cardType" : "Debit Card",
"first6" : "424242",
"last4" : "4242"
},
"flow" : {
"nextAction" : "none"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "ideal",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "NL"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "latvianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LV"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "lithuanianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "maxima",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "multibanco",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "PT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "mybank",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "IT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "p24",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "PL"
},
"email" : "[email protected]"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paypost",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysafecard",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysafecash",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysera",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "EE"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "payu",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CZ"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "perlas",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "skrill",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "three_d_secure",
"status" : "pending",
"billing" : {
"address" : {
"country" : "US"
}
},
"threeDSecure" : {
"amount" : 1000,
"currency" : "USD"
},
"source" : {
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "google_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"googlePay" : {
"cardBrand" : "Visa",
"cardType" : "Debit Card",
"first6" : "424242",
"last4" : "4242"
},
"flow" : {
"nextAction" : "none"
}
},
"flow" : {
"nextAction" : "three_d_secure"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "trustly",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "unionpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
},
"email" : "[email protected]"
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "verkkopankki",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "FI"
}
}
}
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "wechatpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CN"
}
}
}
Deletes an existing payment method object.
If you delete the payment method that is set as the default one, then the most recently added payment method will be used as the new default payment method.
If you delete the last payment method then the default payment method will be set to null
and, if present, the most recently added card will be set as the default card.
A successful request returns identifier of the deleted payment method object.
DEFINITION
DELETE https://api.shift4.com/payment-methods/{PAYMENT_METHOD_ID}
EXAMPLE REQUEST
curl https://api.shift4.com/payment-methods/pm_8HeqP7ZurLKhBPknC5e6sR85 \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa: \
-X DELETE
EXAMPLE RESPONSE
{
"id" : "pm_8P7OWXA5xiTS1ISnyZcum1KV",
}
Lists payment method objects for a given customer.
created
attribute.
Can have following attributes:
gt
- return objects created after given timestampgte
- return objects created after or exactly on given timestamplt
- return objects created before given timestamplte
- return objects created before or exactly on given timestampid=some-example-id
- then you can make another request with startingAfterId=some-example-id
to get the next page of that list.
id=some-example-id
- then you can make another request with endingBeforeId=some-example-id
to get the previous page of that list.
A successful request returns a list of payment method objects.
Results are sorted by creation date, with the most recent objects first.
DEFINITION
GET https://api.shift4.com/payment-methods
EXAMPLE REQUEST
curl "https://api.shift4.com/payment-methods?limit=3" \
-u pr_test_tXHm9qV9qV9bjIRHcQr9PLPa:
EXAMPLE RESPONSE
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "alipay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CN"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "apple_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"applePay" : {
"first6" : "424242",
"last4" : "4242",
"amount" : 1000,
"currency" : "USD"
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "bancontact",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "BE"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "bitpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "blik",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "PL"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "boleto",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "BR"
},
"vat" : "999.999.999-99",
"email" : "[email protected]"
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "eps",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "AT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "estonianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "EE"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "google_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"googlePay" : {
"cardBrand" : "Visa",
"cardType" : "Debit Card",
"first6" : "424242",
"last4" : "4242"
},
"flow" : {
"nextAction" : "none"
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "ideal",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "NL"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "latvianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LV"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "lithuanianbanks",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "maxima",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "multibanco",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "PT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "mybank",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "IT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "p24",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "PL"
},
"email" : "[email protected]"
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paypost",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysafecard",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysafecash",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "paysera",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "EE"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "payu",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CZ"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "perlas",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "LT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "skrill",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "three_d_secure",
"status" : "pending",
"billing" : {
"address" : {
"country" : "US"
}
},
"threeDSecure" : {
"amount" : 1000,
"currency" : "USD"
},
"source" : {
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "google_pay",
"status" : "chargeable",
"billing" : {
"address" : {
"country" : "US"
}
},
"googlePay" : {
"cardBrand" : "Visa",
"cardType" : "Debit Card",
"first6" : "424242",
"last4" : "4242"
},
"flow" : {
"nextAction" : "none"
}
},
"flow" : {
"nextAction" : "three_d_secure"
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "trustly",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "AT"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "unionpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "US"
},
"email" : "[email protected]"
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "verkkopankki",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "FI"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}
{
"list" : [
{
"id" : "pm_BokS87jDShjASDkjhdsak4kl",
"created" : 1415810511,
"objectType" : "payment_method",
"clientObjectId" : "client_pm_kjdS8DSj73DSkjhKJHDKSAna",
"customerId" : "cust_BokS87jDShjASDkjhdsak4kl",
"type" : "wechatpay",
"status" : "chargeable",
"billing" : {
"name" : "Werner Heisenberg",
"address" : {
"country" : "CN"
}
}
},
{ ... },
{ ... }
],
"hasMore" : false
}