fabric Integration Stripe (1.0.0)

Download OpenAPI specification:Download

E-mail: support@fabric.inc License: fabric Inc

fabric Integration Stripe

customer

Customer APIs

Create Customer

Create Customer

Request
Request Body schema: application/json
object
description
string
email
string <email>
metadata
object
name
string >= 3 characters
payment_method
string
object
phone
string
object
Responses
200

Customer was created successfuly

post/customer
Request samples
application/json
{
  • "address": {
    },
  • "description": "This is example text.",
  • "email": "johnsmith@fabric.inc",
  • "metadata": { },
  • "name": "John Smith",
  • "payment_method": "pm_1GulN6FbKq2PvwXbAWV9JJEc",
  • "invoice_settings": {
    },
  • "phone": "123-123-1234",
  • "shipping": {
    }
}
Response samples
application/json
{
  • "id": "cus_8epDebVEl8Bs2V",
  • "object": "customer",
  • "address": {
    },
  • "balance": 0,
  • "created": 1466202923,
  • "currency": "usd",
  • "default_source": "card_18NVYR2eZvKYlo2CQ2ieV9S5",
  • "delinquent": true,
  • "description": "My First Test Customer (created for API docs)",
  • "discount": null,
  • "email": "mia.wilson.99@example.com",
  • "invoice_prefix": "D86E170",
  • "invoice_settings": {
    },
  • "livemode": false,
  • "metadata": {
    },
  • "name": null,
  • "next_invoice_sequence": 113288,
  • "phone": null,
  • "preferred_locales": [
    ],
  • "shipping": {
    },
  • "tax_exempt": "none"
}

Get Customer by Customer Id

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

Request
path Parameters
customerId
required
string
Responses
200

Get customer successfuly

get/customer/{customerId}
Response samples
application/json
{
  • "id": "cus_8epDebVEl8Bs2V",
  • "object": "customer",
  • "address": {
    },
  • "balance": 0,
  • "created": 1466202923,
  • "currency": "usd",
  • "default_source": "card_18NVYR2eZvKYlo2CQ2ieV9S5",
  • "delinquent": true,
  • "description": "My First Test Customer (created for API docs)",
  • "discount": null,
  • "email": "mia.wilson.99@example.com",
  • "invoice_prefix": "D86E170",
  • "invoice_settings": {
    },
  • "livemode": false,
  • "metadata": {
    },
  • "name": null,
  • "next_invoice_sequence": 113288,
  • "phone": null,
  • "preferred_locales": [
    ],
  • "shipping": {
    },
  • "tax_exempt": "none"
}

Update Customer

Update Customer

Request
path Parameters
customerId
required
string
Request Body schema: application/json
object
description
string
email
string <email>
metadata
object
name
string >= 3 characters
phone
string
object
Responses
200

Customer was updated successfuly

patch/customer/{customerId}
Request samples
application/json
{
  • "address": {
    },
  • "description": "This is example text.",
  • "email": "johnsmith@fabric.inc",
  • "metadata": { },
  • "name": "John Smith",
  • "phone": "123-123-1234",
  • "shipping": {
    }
}
Response samples
application/json
{
  • "id": "cus_8epDebVEl8Bs2V",
  • "object": "customer",
  • "address": {
    },
  • "balance": 0,
  • "created": 1466202923,
  • "currency": "usd",
  • "default_source": "card_18NVYR2eZvKYlo2CQ2ieV9S5",
  • "delinquent": true,
  • "description": "My First Test Customer (created for API docs)",
  • "discount": null,
  • "email": "mia.wilson.99@example.com",
  • "invoice_prefix": "D86E170",
  • "invoice_settings": {
    },
  • "livemode": false,
  • "metadata": {
    },
  • "name": null,
  • "next_invoice_sequence": 113288,
  • "phone": null,
  • "preferred_locales": [
    ],
  • "shipping": {
    },
  • "tax_exempt": "none"
}

Delete Customer by Customer Id

Delete Customer by Customer Id

Request
path Parameters
customerId
required
string
Responses
200

Customer was successfuly deleted

delete/customer/{customerId}
Response samples
application/json
{
  • "id": "cus_8epDebVEl8Bs2V",
  • "object": "customer",
  • "deleted": true
}

List of Customers

Request
Request Body schema: application/json
email
string <email>
object
limit
integer [ 1 .. 100 ]
starting_after
string
ending_before
string
Responses
200

List of Customers successfuly

post/customers
Request samples
application/json
{
  • "email": "johnsmith@fabric.inc",
  • "created": {
    },
  • "limit": 10,
  • "starting_after": "cus_HU71SS7faWPfVQ",
  • "ending_before": "cus_HU71SS7faWPfVQ"
}
Response samples
application/json
{
  • "object": "list",
  • "url": "/v1/customers",
  • "has_more": false,
  • "data": [
    ]
}

intent

Payment Intent APIs

Get Payment Intent by Id

Get Payment Intent by Id

Request
path Parameters
paymentIntentId
required
string
Responses
200

Payment Intent was successfuly retrieved

get/payment-intent/{paymentIntentId}
Response samples
application/json
{
  • "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": {
    },
  • "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
  • "confirmation_method": "automatic",
  • "created": 1546743530,
  • "currency": "eur",
  • "customer": null,
  • "description": null,
  • "nvoice": null,
  • "last_payment_error": {
    },
  • "livemode": false,
  • "metadata": { },
  • "next_action": { },
  • "on_behalf_of": "string",
  • "payment_method": "string",
  • "payment_method_options": { },
  • "payment_method_types": [
    ],
  • "receipt_email": "string",
  • "review": "string",
  • "setup_future_usage": "string",
  • "shipping": {
    },
  • "statement_descriptor": "string",
  • "statement_descriptor_suffix": "string",
  • "status": "requires_payment_method",
  • "transfer_data": {
    },
  • "transfer_group": "string"
}

Update Payment Intent

Request
path Parameters
paymentIntentId
required
string
Request Body schema: application/json
amount
integer >= 1
currency
string 3 characters
customer
string
confirm
boolean
off_session
boolean
payment_method
string
payment_method_types
Array of strings non-empty
Items Value: "card"
receipt_email
string <email>
setup_future_usage
string
Enum: "on_session" "off_session"
capture_method
string
Enum: "automati" "manual"
application_fee_amount
integer >= 1
object
Responses
200

Payment Intent was successfuly updated

patch/payment-intent/{paymentIntentId}
Request samples
application/json
{
  • "amount": 1000,
  • "currency": "USD",
  • "customer": "cus_HRp23wXfXMqSao",
  • "confirm": false,
  • "off_session": false,
  • "payment_method": "pm_1Gsv4BFbKq2PvwXbl4XEl1O3",
  • "payment_method_types": [
    ],
  • "receipt_email": "joedoe@fabric.inc",
  • "setup_future_usage": "off_session",
  • "capture_method": "manual",
  • "application_fee_amount": 100,
  • "transfer_data": {
    }
}
Response samples
application/json
{
  • "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": {
    },
  • "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
  • "confirmation_method": "automatic",
  • "created": 1546743530,
  • "currency": "eur",
  • "customer": null,
  • "description": null,
  • "nvoice": null,
  • "last_payment_error": {
    },
  • "livemode": false,
  • "metadata": { },
  • "next_action": { },
  • "on_behalf_of": "string",
  • "payment_method": "string",
  • "payment_method_options": { },
  • "payment_method_types": [
    ],
  • "receipt_email": "string",
  • "review": "string",
  • "setup_future_usage": "string",
  • "shipping": {
    },
  • "statement_descriptor": "string",
  • "statement_descriptor_suffix": "string",
  • "status": "requires_payment_method",
  • "transfer_data": {
    },
  • "transfer_group": "string"
}

Cancel Payment Intent

Request
path Parameters
paymentIntentId
required
string
Request Body schema: application/json
cancellation_reason
string
Default: "requested_by_customer"
Enum: "duplicate" "fraudulent" "requested_by_customer" "abandoned"
Responses
200

Cancel Payment Intent

delete/payment-intent/{paymentIntentId}
Request samples
application/json
{
  • "cancellation_reason": "pm_1Gsv4BFbKq2PvwXbl4XEl1O3"
}
Response samples
application/json
{
  • "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": {
    },
  • "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
  • "confirmation_method": "automatic",
  • "created": 1546743530,
  • "currency": "eur",
  • "customer": null,
  • "description": null,
  • "nvoice": null,
  • "last_payment_error": {
    },
  • "livemode": false,
  • "metadata": { },
  • "next_action": { },
  • "on_behalf_of": "string",
  • "payment_method": "string",
  • "payment_method_options": { },
  • "payment_method_types": [
    ],
  • "receipt_email": "string",
  • "review": "string",
  • "setup_future_usage": "string",
  • "shipping": {
    },
  • "statement_descriptor": "string",
  • "statement_descriptor_suffix": "string",
  • "status": "requires_payment_method",
  • "transfer_data": {
    },
  • "transfer_group": "string"
}

Create Payment Intent

Request
Request Body schema: application/json
amount
required
integer >= 1
currency
required
string 3 characters
customer
string
confirm
boolean
Default: false
off_session
boolean
Default: false
string or object
payment_method_types
Array of strings non-empty
Default: ["card"]
Items Value: "card"
receipt_email
string <email>
setup_future_usage
string
Default: "off_session"
Enum: "on_session" "off_session"
capture_method
string
Default: "manual"
Enum: "automatic" "manual"
object
object
metadata
object
Responses
200

Payment Intent was successfuly created

post/payment-intent
Request samples
application/json
{
  • "amount": 1000,
  • "currency": "USD",
  • "customer": "cus_HRp23wXfXMqSao",
  • "confirm": false,
  • "off_session": false,
  • "payment_method": "pm_1Gsv4BFbKq2PvwXbl4XEl1O3",
  • "payment_method_types": [
    ],
  • "receipt_email": "joedoe@fabric.inc",
  • "setup_future_usage": "off_session",
  • "capture_method": "manual",
  • "application_fee_amount": {
    },
  • "transfer_data": {
    },
  • "metadata": { }
}
Response samples
application/json
{
  • "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": {
    },
  • "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
  • "confirmation_method": "automatic",
  • "created": 1546743530,
  • "currency": "eur",
  • "customer": null,
  • "description": null,
  • "nvoice": null,
  • "last_payment_error": {
    },
  • "livemode": false,
  • "metadata": { },
  • "next_action": { },
  • "on_behalf_of": "string",
  • "payment_method": "string",
  • "payment_method_options": { },
  • "payment_method_types": [
    ],
  • "receipt_email": "string",
  • "review": "string",
  • "setup_future_usage": "string",
  • "shipping": {
    },
  • "statement_descriptor": "string",
  • "statement_descriptor_suffix": "string",
  • "status": "requires_payment_method",
  • "transfer_data": {
    },
  • "transfer_group": "string"
}

Confirm Payment IntentDeprecated

Request
path Parameters
paymentIntentId
required
string
Request Body schema: application/json
payment_method
string
receipt_email
string <email>
setup_future_usage
string
Enum: "on_session" "off_session"
Responses
200

Confitm Payment Intent was successsful

post/payment-intent/confirm/{paymentIntentId}
Request samples
application/json
{
  • "payment_method": "pm_1Gsv4BFbKq2PvwXbl4XEl1O3",
  • "receipt_email": "joedoe@fabric.inc",
  • "setup_future_usage": "off_session"
}
Response samples
application/json
{
  • "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": {
    },
  • "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
  • "confirmation_method": "automatic",
  • "created": 1546743530,
  • "currency": "eur",
  • "customer": null,
  • "description": null,
  • "nvoice": null,
  • "last_payment_error": {
    },
  • "livemode": false,
  • "metadata": { },
  • "next_action": { },
  • "on_behalf_of": "string",
  • "payment_method": "string",
  • "payment_method_options": { },
  • "payment_method_types": [
    ],
  • "receipt_email": "string",
  • "review": "string",
  • "setup_future_usage": "string",
  • "shipping": {
    },
  • "statement_descriptor": "string",
  • "statement_descriptor_suffix": "string",
  • "status": "requires_payment_method",
  • "transfer_data": {
    },
  • "transfer_group": "string"
}

Capture Payment Intent

Request
path Parameters
paymentIntentId
required
string
Request Body schema: application/json
amount_to_capture
integer >= 1
application_fee_amount
integer >= 1
object
Responses
200

Capture Payment Intent was successfull

post/payment-intent/capture/{paymentIntentId}
Request samples
application/json
{
  • "amount_to_capture": 1000,
  • "application_fee_amount": 1000,
  • "transfer_data": {
    }
}
Response samples
application/json
{
  • "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": {
    },
  • "client_secret": "pi_1DpRqg2eZvKYlo2CDp9Ko99t_secret_4QlXQ5gMV3Es2MlgKOY1pbXMc",
  • "confirmation_method": "automatic",
  • "created": 1546743530,
  • "currency": "eur",
  • "customer": null,
  • "description": null,
  • "nvoice": null,
  • "last_payment_error": {
    },
  • "livemode": false,
  • "metadata": { },
  • "next_action": { },
  • "on_behalf_of": "string",
  • "payment_method": "string",
  • "payment_method_options": { },
  • "payment_method_types": [
    ],
  • "receipt_email": "string",
  • "review": "string",
  • "setup_future_usage": "string",
  • "shipping": {
    },
  • "statement_descriptor": "string",
  • "statement_descriptor_suffix": "string",
  • "status": "requires_payment_method",
  • "transfer_data": {
    },
  • "transfer_group": "string"
}

payment-method

Payment Method APIs

Attach a Payment Method to a Customer

Request
path Parameters
paymentMethodId
required
string
Request Body schema: application/json
object
Responses
200

Attach a Payment Method to a Customer was successfuly

post/payment-method/{paymentMethodId}/attach
Request samples
application/json
{ }
Response samples
application/json
{
  • "id": "pm_1Jc71c2eZvKYlo2C5EpxHvnY",
  • "object": "payment_method",
  • "billing_details": {
    },
  • "card": {
    },
  • "created": 12345678,
  • "customer": null,
  • "livemode": false,
  • "metadata": { },
  • "type": "card"
}

Detach a Payment Method from a Customer by Payment Method Id

Request
path Parameters
paymentMethodId
required
string
Responses
200

Detach a Payment Method from a Customer by Payment Method Id was successful

post/payment-method/{paymentMethodId}/detach
Response samples
application/json
{
  • "id": "pm_1Jc71c2eZvKYlo2C5EpxHvnY",
  • "object": "payment_method",
  • "billing_details": {
    },
  • "card": {
    },
  • "created": 12345678,
  • "customer": null,
  • "livemode": false,
  • "metadata": { },
  • "type": "card"
}

Get Payment Method by Id

Request
path Parameters
paymentMethodId
required
string
Responses
200

Get Payment Method by Id was successful

get/payment-method/{paymentMethodId}
Response samples
application/json
{
  • "id": "pm_1Jc71c2eZvKYlo2C5EpxHvnY",
  • "object": "payment_method",
  • "billing_details": {
    },
  • "card": {
    },
  • "created": 12345678,
  • "customer": null,
  • "livemode": false,
  • "metadata": { },
  • "type": "card"
}

Update Payment Method By PaymentMethodId

Update Payment Method

Request
path Parameters
paymentMethodId
required
string
Request Body schema: application/json
object
metadata
object
object
Responses
200

Update Payment Method successful

patch/payment-method/{paymentMethodId}
Request samples
application/json
{
  • "billing_details": {
    },
  • "metadata": { },
  • "card": {
    }
}
Response samples
application/json
{
  • "id": "pm_1Jc71c2eZvKYlo2C5EpxHvnY",
  • "object": "payment_method",
  • "billing_details": {
    },
  • "card": {
    },
  • "created": 12345678,
  • "customer": null,
  • "livemode": false,
  • "metadata": { },
  • "type": "card"
}

List Payment Methods

Request
Request Body schema: application/json
customer
required
string
type
string
Default: "card"
Enum: "au_becs_debit" "bacs_debit" "bancontact" "card" "eps" "fpx" "giropay" "ideal" "p24" "sepa_debit"
limit
integer [ 1 .. 100 ]
starting_after
string
ending_before
string
Responses
200

List Payment Methods was successful

post/payment-methods
Request samples
application/json
{
  • "customer": "cus_HZlDXNXLHSOcLj",
  • "type": "card",
  • "limit": 10,
  • "starting_after": "pm_1H0bhA2eZvKYlo2ClFepu5sQ",
  • "ending_before": "pm_1H0bhA2eZvKYlo2ClFepu5sQ"
}
Response samples
application/json
{
  • "object": "list",
  • "url": "/v1/payment_methods",
  • "has_more": false,
  • "data": [
    ]
}

refund

Refund APIs

Create Refund

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.

Request
Request Body schema: application/json
amount
integer >= 1
payment_intent
string
reason
string
Default: "requested_by_customer"
Enum: "duplicate" "fraudulent" "requested_by_customer"
refund_application_fee
boolean
Default: false
Responses
200

Create Refund was successful

post/refund
Request samples
application/json
{
  • "amount": 1000,
  • "payment_intent": "pi_1GsyhzFbKq2PvwXbwAI3ZluI",
  • "reason": "requested_by_customer",
  • "refund_application_fee": false
}
Response samples
application/json
{
  • "id": "re_3Jc9Yc2eZvKYlo2C0pfyXwjx",
  • "object": "refund",
  • "amount": 100,
  • "balance_transaction": null,
  • "charge": "ch_3Jc9Yc2eZvKYlo2C0NpFs8Yt",
  • "created": 1632232972,
  • "currency": "usd",
  • "metadata": { },
  • "payment_intent": "nul",
  • "reason": null,
  • "receipt_number": null,
  • "source_transfer_reversal": null,
  • "status": "succeeded",
  • "transfer_reversal": null
}

Get Refund

Request
path Parameters
refundId
required
string
Responses
200

Get Refund was successful

get/refund/{refundId}
Response samples
application/json
{
  • "id": "re_3Jc9Yc2eZvKYlo2C0pfyXwjx",
  • "object": "refund",
  • "amount": 100,
  • "balance_transaction": null,
  • "charge": "ch_3Jc9Yc2eZvKYlo2C0NpFs8Yt",
  • "created": 1632232972,
  • "currency": "usd",
  • "metadata": { },
  • "payment_intent": "nul",
  • "reason": null,
  • "receipt_number": null,
  • "source_transfer_reversal": null,
  • "status": "succeeded",
  • "transfer_reversal": null
}

Update Payment Intent

Request
path Parameters
refundId
required
string
Request Body schema: application/json
object
Responses
200

Update Payment Intent was successfull

patch/refund/{refundId}
Request samples
application/json
{ }
Response samples
application/json
{
  • "id": "re_3Jc9Yc2eZvKYlo2C0pfyXwjx",
  • "object": "refund",
  • "amount": 100,
  • "balance_transaction": null,
  • "charge": "ch_3Jc9Yc2eZvKYlo2C0NpFs8Yt",
  • "created": 1632232972,
  • "currency": "usd",
  • "metadata": { },
  • "payment_intent": "nul",
  • "reason": null,
  • "receipt_number": null,
  • "source_transfer_reversal": null,
  • "status": "succeeded",
  • "transfer_reversal": null
}

List Refunds

Request
Request Body schema: application/json
payment_intent
string
object
limit
integer [ 1 .. 100 ]
starting_after
string
ending_before
string
Responses
200

List Refunds was successful

post/refunds
Request samples
application/json
{
  • "payment_intent": "pi_1GsyhzFbKq2PvwXbwAI3ZluI",
  • "created": {
    },
  • "limit": 10,
  • "starting_after": "re_1GtLjtFbKq2PvwXb52R6Qek3",
  • "ending_before": "re_1GtLjtFbKq2PvwXb52R6Qek3"
}
Response samples
application/json
{
  • "object": "list",
  • "url": "/v1/refunds",
  • "has_more": false,
  • "data": [
    ]
}