Download OpenAPI specification:Download
fabric Pay APIs.
Add customer
Customer was created successfuly
A generic client error
Internal Server Error
{- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "description": "This is example text.",
- "email": "johnsmith@fabric.inc",
- "metadata": { },
- "name": "John Smith",
- "payment_method": "pm_1GulN6FbKq2PvwXbAWV9JJEc",
- "invoice_settings": {
- "default_payment_method": "pm_1GulN6FbKq2PvwXbAWV9JJEc"
}, - "phone": "123-123-1234",
- "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "name": "John Smith",
- "phone": "123-123-1234"
}
}
{- "id": "cus_8epDebVEl8Bs2V",
- "object": "customer",
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "balance": 0,
- "created": 1466202923,
- "currency": "usd",
- "default_source": "card_18NVYR2eZvKYlo2CQ2ieV9S5",
- "delinquent": true,
- "description": "My First Test Customer (created for API docs)",
- "discount": {
- "id": "abc",
- "customer": "cus_123abcdef",
- "end": 1233213333,
- "start": 1233213333
}, - "email": "mia.wilson.99@example.com",
- "invoice_prefix": "D86E170",
- "invoice_settings": {
- "custom_fields": {
- "name": "string",
- "value": "string"
}, - "default_payment_method": "string",
- "footer": "string"
}, - "livemode": false,
- "metadata": {
- "order_id": 673
}, - "name": "John Smith",
- "next_invoice_sequence": 113288,
- "phone": "123-123-1234",
- "preferred_locales": [
- "string",
- "string"
], - "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "name": "John Smith",
- "phone": "123-123-1234"
}, - "tax_exempt": "exempt"
}
If customer exists and was not deleted you will get a Customer object
If customer exists but was deleted you will get a DeletedCustomer object
Get customer successfuly
A generic client error
Internal Server Error
{- "id": "cus_8epDebVEl8Bs2V",
- "object": "customer",
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "balance": 0,
- "created": 1466202923,
- "currency": "usd",
- "default_source": "card_18NVYR2eZvKYlo2CQ2ieV9S5",
- "delinquent": true,
- "description": "My First Test Customer (created for API docs)",
- "discount": {
- "id": "abc",
- "customer": "cus_123abcdef",
- "end": 1233213333,
- "start": 1233213333
}, - "email": "mia.wilson.99@example.com",
- "invoice_prefix": "D86E170",
- "invoice_settings": {
- "custom_fields": {
- "name": "string",
- "value": "string"
}, - "default_payment_method": "string",
- "footer": "string"
}, - "livemode": false,
- "metadata": {
- "order_id": 673
}, - "name": "John Smith",
- "next_invoice_sequence": 113288,
- "phone": "123-123-1234",
- "preferred_locales": [
- "string",
- "string"
], - "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "name": "John Smith",
- "phone": "123-123-1234"
}, - "tax_exempt": "exempt"
}
Update customer
Customer was retrieved successfully
A generic client error
Internal Server Error
{- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "description": "This is example text.",
- "email": "johnsmith@fabric.inc",
- "metadata": { },
- "name": "John Smith",
- "payment_method": "pm_1GulN6FbKq2PvwXbAWV9JJEc",
- "invoice_settings": {
- "default_payment_method": "pm_1GulN6FbKq2PvwXbAWV9JJEc"
}, - "phone": "123-123-1234",
- "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "name": "John Smith",
- "phone": "123-123-1234"
}
}
{- "id": "cus_8epDebVEl8Bs2V",
- "object": "customer",
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "balance": 0,
- "created": 1466202923,
- "currency": "usd",
- "default_source": "card_18NVYR2eZvKYlo2CQ2ieV9S5",
- "delinquent": true,
- "description": "My First Test Customer (created for API docs)",
- "discount": {
- "id": "abc",
- "customer": "cus_123abcdef",
- "end": 1233213333,
- "start": 1233213333
}, - "email": "mia.wilson.99@example.com",
- "invoice_prefix": "D86E170",
- "invoice_settings": {
- "custom_fields": {
- "name": "string",
- "value": "string"
}, - "default_payment_method": "string",
- "footer": "string"
}, - "livemode": false,
- "metadata": {
- "order_id": 673
}, - "name": "John Smith",
- "next_invoice_sequence": 113288,
- "phone": "123-123-1234",
- "preferred_locales": [
- "string",
- "string"
], - "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "name": "John Smith",
- "phone": "123-123-1234"
}, - "tax_exempt": "exempt"
}
List of Customers successfuly retrieved
A generic client error
Internal Server Error
{- "email": "johnsmith@fabric.inc",
- "created": {
- "gt": 1591917132,
- "gte": 1591917132,
- "lt": 1591917132,
- "lte": 1591917132
}, - "limit": 10,
- "starting_after": "cus_HU71SS7faWPfVQ",
- "ending_before": "cus_HU71SS7faWPfVQ"
}
{- "object": "list",
- "url": "/v1/customers",
- "has_more": false,
- "data": [
- {
- "id": "cus_8epDebVEl8Bs2V",
- "object": "customer",
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "balance": 0,
- "created": 1466202923,
- "currency": "usd",
- "default_source": "card_18NVYR2eZvKYlo2CQ2ieV9S5",
- "delinquent": true,
- "description": "My First Test Customer (created for API docs)",
- "discount": {
- "id": "abc",
- "customer": "cus_123abcdef",
- "end": 1233213333,
- "start": 1233213333
}, - "email": "mia.wilson.99@example.com",
- "invoice_prefix": "D86E170",
- "invoice_settings": {
- "custom_fields": {
- "name": "string",
- "value": "string"
}, - "default_payment_method": "string",
- "footer": "string"
}, - "livemode": false,
- "metadata": {
- "order_id": 673
}, - "name": "John Smith",
- "next_invoice_sequence": 113288,
- "phone": "123-123-1234",
- "preferred_locales": [
- "string",
- "string"
], - "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "name": "John Smith",
- "phone": "123-123-1234"
}, - "tax_exempt": "exempt"
}
]
}
Test
Attaching a Payment Method to a Customer was successful
A generic client error
Internal Server Error
{- "customer": "cus_HZlDXNXLHSOcLj"
}
{- "id": "pm_1Jc71c2eZvKYlo2C5EpxHvnY",
- "object": "payment_method",
- "billing_details": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "email": "jenny@example.com",
- "name": "Thomas Jefferson",
- "phone": "+1555-555-5555"
}, - "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": "pass",
- "address_postal_code_check": "pass",
- "cvc_check": "pass"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2022,
- "fingerprint": "Xt5EWLLDS7FJjR1c",
- "funding": "credit",
- "generated_from": null,
- "last4": 4242,
- "networks": {
- "available": [
- "visa"
], - "preferred": "visa"
}, - "three_d_secure_usage": {
- "supported": true
}, - "wallet": null
}, - "created": 12345678,
- "customer": null,
- "livemode": false,
- "metadata": {
- "order_id": "123456789"
}, - "type": "card"
}
Detach a Payment Method from a Customer by Payment Method Id was successful
A generic client error
Internal Server Error
{- "id": "pm_1Jc71c2eZvKYlo2C5EpxHvnY",
- "object": "payment_method",
- "billing_details": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "email": "jenny@example.com",
- "name": "Thomas Jefferson",
- "phone": "+1555-555-5555"
}, - "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": "pass",
- "address_postal_code_check": "pass",
- "cvc_check": "pass"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2022,
- "fingerprint": "Xt5EWLLDS7FJjR1c",
- "funding": "credit",
- "generated_from": null,
- "last4": 4242,
- "networks": {
- "available": [
- "visa"
], - "preferred": "visa"
}, - "three_d_secure_usage": {
- "supported": true
}, - "wallet": null
}, - "created": 12345678,
- "customer": null,
- "livemode": false,
- "metadata": {
- "order_id": "123456789"
}, - "type": "card"
}
Get Payment Intent by Id
Payment Intent was successfuly retrieved
A generic client error
Internal Server Error
{- "id": "pi_1DpRqg2eZvKYlo2CDp9Ko99t",
- "object": "payment_intent",
- "amount": 1099,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "object": "list",
- "data": [ ],
- "has_more": false,
- "url": "/v1/charges?payment_intent=pi_1DpRqg2eZvKYlo2CDp9Ko99"
}, - "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
- "confirmation_method": "automatic",
- "created": 1546743530,
- "currency": "eur",
- "customer": null,
- "description": null,
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_122345678",
- "code": "200 - OK",
- "decline_code": "default",
- "message": "This didn't work out.",
- "param": "Customer id should be a string.",
- "payment_method": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "unavailable"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2023,
- "fingerprint": "kEBuBXcEH36zrhx9",
- "funding": "credit",
- "installments": null,
- "last4": "0019",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
}, - "type": "card"
}, - "payment_method_type": "card",
- "type": "idempotency_error"
}, - "livemode": false,
- "metadata": { },
- "next_action": null,
- "on_behalf_of": null,
- "payment_method": "pm_123abcdef123",
- "payment_method_options": {
- "card": {
- "installments": null,
- "network": null,
- "request_three_d_secure": "automatic"
}
}, - "payment_method_types": [
- "card"
], - "receipt_email": null,
- "review": null,
- "setup_future_usage": "off_session",
- "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "carrier": "USPS",
- "name": "George Washington",
- "phone": "312-312-7777",
- "tracking_number": "123ABC321"
}, - "statement_descriptor": null,
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": {
- "destination": "acct_1GtG8vJwgwMmQiI2",
- "amount": 1000
}, - "transfer_group": null
}
Payment Intent was successfuly updated
A generic client error
Internal Server Error
{- "amount": 1099,
- "currency": "eur",
- "customer": null,
- "payment_method": "pm_123abcdef123",
- "payment_method_options": {
- "card": {
- "installments": null,
- "network": null,
- "request_three_d_secure": "automatic"
}
}, - "payment_method_types": [
- "card"
], - "receipt_email": null,
- "setup_future_usage": "on_session",
- "capture_method": "automatic",
- "transfer_data": {
- "destination": "acct_1GtG8vJwgwMmQiI2",
- "amount": 1000
}
}
{- "id": "pi_1DpRqg2eZvKYlo2CDp9Ko99t",
- "object": "payment_intent",
- "amount": 1099,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "object": "list",
- "data": [ ],
- "has_more": false,
- "url": "/v1/charges?payment_intent=pi_1DpRqg2eZvKYlo2CDp9Ko99"
}, - "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
- "confirmation_method": "automatic",
- "created": 1546743530,
- "currency": "eur",
- "customer": null,
- "description": null,
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_122345678",
- "code": "200 - OK",
- "decline_code": "default",
- "message": "This didn't work out.",
- "param": "Customer id should be a string.",
- "payment_method": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "unavailable"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2023,
- "fingerprint": "kEBuBXcEH36zrhx9",
- "funding": "credit",
- "installments": null,
- "last4": "0019",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
}, - "type": "card"
}, - "payment_method_type": "card",
- "type": "idempotency_error"
}, - "livemode": false,
- "metadata": { },
- "next_action": null,
- "on_behalf_of": null,
- "payment_method": "pm_123abcdef123",
- "payment_method_options": {
- "card": {
- "installments": null,
- "network": null,
- "request_three_d_secure": "automatic"
}
}, - "payment_method_types": [
- "card"
], - "receipt_email": null,
- "review": null,
- "setup_future_usage": "off_session",
- "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "carrier": "USPS",
- "name": "George Washington",
- "phone": "312-312-7777",
- "tracking_number": "123ABC321"
}, - "statement_descriptor": null,
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": {
- "destination": "acct_1GtG8vJwgwMmQiI2",
- "amount": 1000
}, - "transfer_group": null
}
Payment Intent Successfully Canceled
A generic client error
Internal Server Error
{- "cancellation_reason": "requested_by_customer"
}
{- "id": "pi_1DpRqg2eZvKYlo2CDp9Ko99t",
- "object": "payment_intent",
- "amount": 1099,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "object": "list",
- "data": [ ],
- "has_more": false,
- "url": "/v1/charges?payment_intent=pi_1DpRqg2eZvKYlo2CDp9Ko99"
}, - "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
- "confirmation_method": "automatic",
- "created": 1546743530,
- "currency": "eur",
- "customer": null,
- "description": null,
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_122345678",
- "code": "200 - OK",
- "decline_code": "default",
- "message": "This didn't work out.",
- "param": "Customer id should be a string.",
- "payment_method": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "unavailable"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2023,
- "fingerprint": "kEBuBXcEH36zrhx9",
- "funding": "credit",
- "installments": null,
- "last4": "0019",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
}, - "type": "card"
}, - "payment_method_type": "card",
- "type": "idempotency_error"
}, - "livemode": false,
- "metadata": { },
- "next_action": null,
- "on_behalf_of": null,
- "payment_method": "pm_123abcdef123",
- "payment_method_options": {
- "card": {
- "installments": null,
- "network": null,
- "request_three_d_secure": "automatic"
}
}, - "payment_method_types": [
- "card"
], - "receipt_email": null,
- "review": null,
- "setup_future_usage": "off_session",
- "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "carrier": "USPS",
- "name": "George Washington",
- "phone": "312-312-7777",
- "tracking_number": "123ABC321"
}, - "statement_descriptor": null,
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": {
- "destination": "acct_1GtG8vJwgwMmQiI2",
- "amount": 1000
}, - "transfer_group": null
}
Payment Intent was successfuly created
A generic client error
Internal Server Error
{- "amount": 1099,
- "currency": "eur",
- "customer": null,
- "confirm": false,
- "off_session": false,
- "payment_method": "pm_1Gsv4BFbKq2PvwXbl4XEl1O3",
- "payment_method_types": [
- "card"
], - "receipt_email": "joedoe@fabric.inc",
- "setup_future_usage": "off_session",
- "transfer_data": {
- "destination": "acct_1GtG8vJwgwMmQiI2",
- "amount": 1000
}, - "metadata": { }
}
{- "id": "pi_1DpRqg2eZvKYlo2CDp9Ko99t",
- "object": "payment_intent",
- "amount": 1099,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "object": "list",
- "data": [ ],
- "has_more": false,
- "url": "/v1/charges?payment_intent=pi_1DpRqg2eZvKYlo2CDp9Ko99"
}, - "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
- "confirmation_method": "automatic",
- "created": 1546743530,
- "currency": "eur",
- "customer": null,
- "description": null,
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_122345678",
- "code": "200 - OK",
- "decline_code": "default",
- "message": "This didn't work out.",
- "param": "Customer id should be a string.",
- "payment_method": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "unavailable"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2023,
- "fingerprint": "kEBuBXcEH36zrhx9",
- "funding": "credit",
- "installments": null,
- "last4": "0019",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
}, - "type": "card"
}, - "payment_method_type": "card",
- "type": "idempotency_error"
}, - "livemode": false,
- "metadata": { },
- "next_action": null,
- "on_behalf_of": null,
- "payment_method": "pm_123abcdef123",
- "payment_method_options": {
- "card": {
- "installments": null,
- "network": null,
- "request_three_d_secure": "automatic"
}
}, - "payment_method_types": [
- "card"
], - "receipt_email": null,
- "review": null,
- "setup_future_usage": "off_session",
- "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "carrier": "USPS",
- "name": "George Washington",
- "phone": "312-312-7777",
- "tracking_number": "123ABC321"
}, - "statement_descriptor": null,
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": {
- "destination": "acct_1GtG8vJwgwMmQiI2",
- "amount": 1000
}, - "transfer_group": null
}
Confirm payment intent was successsful
A generic client error
Internal Server Error
{- "payment_method": "pm_1Gsv4BFbKq2PvwXbl4XEl1O3",
- "receipt_email": "joedoe@fabric.inc",
- "setup_future_usage": "off_session"
}
{- "id": "pi_1DpRqg2eZvKYlo2CDp9Ko99t",
- "object": "payment_intent",
- "amount": 1099,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "object": "list",
- "data": [ ],
- "has_more": false,
- "url": "/v1/charges?payment_intent=pi_1DpRqg2eZvKYlo2CDp9Ko99"
}, - "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
- "confirmation_method": "automatic",
- "created": 1546743530,
- "currency": "eur",
- "customer": null,
- "description": null,
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_122345678",
- "code": "200 - OK",
- "decline_code": "default",
- "message": "This didn't work out.",
- "param": "Customer id should be a string.",
- "payment_method": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "unavailable"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2023,
- "fingerprint": "kEBuBXcEH36zrhx9",
- "funding": "credit",
- "installments": null,
- "last4": "0019",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
}, - "type": "card"
}, - "payment_method_type": "card",
- "type": "idempotency_error"
}, - "livemode": false,
- "metadata": { },
- "next_action": null,
- "on_behalf_of": null,
- "payment_method": "pm_123abcdef123",
- "payment_method_options": {
- "card": {
- "installments": null,
- "network": null,
- "request_three_d_secure": "automatic"
}
}, - "payment_method_types": [
- "card"
], - "receipt_email": null,
- "review": null,
- "setup_future_usage": "off_session",
- "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "carrier": "USPS",
- "name": "George Washington",
- "phone": "312-312-7777",
- "tracking_number": "123ABC321"
}, - "statement_descriptor": null,
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": {
- "destination": "acct_1GtG8vJwgwMmQiI2",
- "amount": 1000
}, - "transfer_group": null
}
Capture Payment Intent was successful
A generic client error
Internal Server Error
{- "amount_to_capture": 1000,
- "transfer_data": {
- "destination": "acct_1GtG8vJwgwMmQiI2",
- "amount": 1000
}
}
{- "id": "pi_1DpRqg2eZvKYlo2CDp9Ko99t",
- "object": "payment_intent",
- "amount": 1099,
- "amount_capturable": 0,
- "amount_received": 0,
- "application": null,
- "application_fee_amount": null,
- "canceled_at": null,
- "cancellation_reason": null,
- "capture_method": "automatic",
- "charges": {
- "object": "list",
- "data": [ ],
- "has_more": false,
- "url": "/v1/charges?payment_intent=pi_1DpRqg2eZvKYlo2CDp9Ko99"
}, - "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
- "confirmation_method": "automatic",
- "created": 1546743530,
- "currency": "eur",
- "customer": null,
- "description": null,
- "invoice": null,
- "last_payment_error": {
- "charge": "ch_122345678",
- "code": "200 - OK",
- "decline_code": "default",
- "message": "This didn't work out.",
- "param": "Customer id should be a string.",
- "payment_method": {
- "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": null,
- "address_postal_code_check": null,
- "cvc_check": "unavailable"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2023,
- "fingerprint": "kEBuBXcEH36zrhx9",
- "funding": "credit",
- "installments": null,
- "last4": "0019",
- "network": "visa",
- "three_d_secure": null,
- "wallet": null
}, - "type": "card"
}, - "payment_method_type": "card",
- "type": "idempotency_error"
}, - "livemode": false,
- "metadata": { },
- "next_action": null,
- "on_behalf_of": null,
- "payment_method": "pm_123abcdef123",
- "payment_method_options": {
- "card": {
- "installments": null,
- "network": null,
- "request_three_d_secure": "automatic"
}
}, - "payment_method_types": [
- "card"
], - "receipt_email": null,
- "review": null,
- "setup_future_usage": "off_session",
- "shipping": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "carrier": "USPS",
- "name": "George Washington",
- "phone": "312-312-7777",
- "tracking_number": "123ABC321"
}, - "statement_descriptor": null,
- "statement_descriptor_suffix": null,
- "status": "requires_payment_method",
- "transfer_data": {
- "destination": "acct_1GtG8vJwgwMmQiI2",
- "amount": 1000
}, - "transfer_group": null
}
Get Payment Method by Id was successful
A generic client error
Internal Server Error
{- "id": "pm_1Jc71c2eZvKYlo2C5EpxHvnY",
- "object": "payment_method",
- "billing_details": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "email": "jenny@example.com",
- "name": "Thomas Jefferson",
- "phone": "+1555-555-5555"
}, - "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": "pass",
- "address_postal_code_check": "pass",
- "cvc_check": "pass"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2022,
- "fingerprint": "Xt5EWLLDS7FJjR1c",
- "funding": "credit",
- "generated_from": null,
- "last4": 4242,
- "networks": {
- "available": [
- "visa"
], - "preferred": "visa"
}, - "three_d_secure_usage": {
- "supported": true
}, - "wallet": null
}, - "created": 12345678,
- "customer": null,
- "livemode": false,
- "metadata": {
- "order_id": "123456789"
}, - "type": "card"
}
List Payment Methods was successful
A generic client error
Internal Server Error
{- "customer": "cus_HZlDXNXLHSOcLj",
- "type": "card",
- "limit": 10,
- "starting_after": "pm_1H0bhA2eZvKYlo2ClFepu5sQ",
- "ending_before": "pm_1H0bhA2eZvKYlo2ClFepu5sQ"
}
{- "object": "list",
- "url": "/v1/payment_methods",
- "has_more": false,
- "data": [
- {
- "id": "pm_1Jc71c2eZvKYlo2C5EpxHvnY",
- "object": "payment_method",
- "billing_details": {
- "address": {
- "city": "New York",
- "country": "US",
- "line1": "108 Main Street",
- "line2": "4th Avenue",
- "postal_code": 10003,
- "state": "NY"
}, - "email": "jenny@example.com",
- "name": "Thomas Jefferson",
- "phone": "+1555-555-5555"
}, - "card": {
- "brand": "visa",
- "checks": {
- "address_line1_check": "pass",
- "address_postal_code_check": "pass",
- "cvc_check": "pass"
}, - "country": "US",
- "exp_month": 12,
- "exp_year": 2022,
- "fingerprint": "Xt5EWLLDS7FJjR1c",
- "funding": "credit",
- "generated_from": null,
- "last4": 4242,
- "networks": {
- "available": [
- "visa"
], - "preferred": "visa"
}, - "three_d_secure_usage": {
- "supported": true
}, - "wallet": null
}, - "created": 12345678,
- "customer": null,
- "livemode": false,
- "metadata": {
- "order_id": "123456789"
}, - "type": "card"
}
]
}
Creates a full refund if amount is not provided or is equal to the amount of payment intent. Partial refund is created upon providing amount lesser than the payment intent.
Create Refund was successful
A generic client error
Internal Server Error
{- "amount": 1000,
- "payment_intent": "pi_1GsyhzFbKq2PvwXbwAI3ZluI",
- "reason": "requested_by_customer",
- "refund_application_fee": false
}
{- "id": "re_3Jc9Yc2eZvKYlo2C0pfyXwjx",
- "object": "refund",
- "amount": 100,
- "balance_transaction": null,
- "charge": "ch_3Jc9Yc2eZvKYlo2C0NpFs8Yt",
- "created": 1632232972,
- "currency": "usd",
- "description": "description",
- "metadata": { },
- "payment_intent": "pi_1IdQBOJxr7zyIFb9qX4HxzL1",
- "reason": "expired_uncaptured_charge",
- "receipt_number": null,
- "source_transfer_reversal": null,
- "status": "succeeded",
- "transfer_reversal": null
}
{- "id": "re_3Jc9Yc2eZvKYlo2C0pfyXwjx",
- "object": "refund",
- "amount": 100,
- "balance_transaction": null,
- "charge": "ch_3Jc9Yc2eZvKYlo2C0NpFs8Yt",
- "created": 1632232972,
- "currency": "usd",
- "description": "description",
- "metadata": { },
- "payment_intent": "pi_1IdQBOJxr7zyIFb9qX4HxzL1",
- "reason": "expired_uncaptured_charge",
- "receipt_number": null,
- "source_transfer_reversal": null,
- "status": "succeeded",
- "transfer_reversal": null
}
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
Update Refund was successful
A generic client error
Internal Server Error
{ }
{- "id": "re_3Jc9Yc2eZvKYlo2C0pfyXwjx",
- "object": "refund",
- "amount": 100,
- "balance_transaction": null,
- "charge": "ch_3Jc9Yc2eZvKYlo2C0NpFs8Yt",
- "created": 1632232972,
- "currency": "usd",
- "description": "description",
- "metadata": { },
- "payment_intent": "pi_1IdQBOJxr7zyIFb9qX4HxzL1",
- "reason": "expired_uncaptured_charge",
- "receipt_number": null,
- "source_transfer_reversal": null,
- "status": "succeeded",
- "transfer_reversal": null
}
List Refunds was successful
A generic client error
Internal Server Error
{- "payment_intent": "pi_1GsyhzFbKq2PvwXbwAI3ZluI",
- "created": {
- "gt": 1591917132,
- "gte": 1591917132,
- "lt": 1591917132,
- "lte": 1591917132
}, - "limit": 10,
- "starting_after": "re_1GtLjtFbKq2PvwXb52R6Qek3",
- "ending_before": "re_1GtLjtFbKq2PvwXb52R6Qek3"
}
{- "object": "list",
- "url": "/v1/refunds",
- "has_more": false,
- "data": [
- {
- "id": "re_3Jc9Yc2eZvKYlo2C0pfyXwjx",
- "object": "refund",
- "amount": 100,
- "balance_transaction": null,
- "charge": "ch_3Jc9Yc2eZvKYlo2C0NpFs8Yt",
- "created": 1632232972,
- "currency": "usd",
- "description": "description",
- "metadata": { },
- "payment_intent": "pi_1IdQBOJxr7zyIFb9qX4HxzL1",
- "reason": "expired_uncaptured_charge",
- "receipt_number": null,
- "source_transfer_reversal": null,
- "status": "succeeded",
- "transfer_reversal": null
}
]
}