Payment Methods
To pay for things, your users need to have a payment method in the system. They can add it in their purchasing flow, or have it on file as their default_payment_method
, which can be updated in the User Object. The default_payment_method
will automatically be set to the last payment method used by the user to pay for an order.
Note: Ensure you update the BuiltOn API when your users add or update a payment method. When done directly through outside payment providers, our APIs won’t be notified and the payment will not be processed or tracked in our system.
Payment Method Object
Attributes | Type | Description |
|
| Currently just |
|
| Name of the Payment Method. This can be set by the user and/or shown if desired. |
|
|
|
Paths listed below and denoted with an asterisk are accessible to both User and Admin Roles.
Retrieve a Payment Method*
Retrieves the payment method with a given ID.
|
| This is the unique ID of the queried payment method. |
List all Payment Methods*
Retrieves a list of all Payment Methods associated with the user.
Attribute | Type | Description |
|
| Number of items to retrieve. |
|
| Which page to retrieve. Default page size is 10. |
|
| Field used for sorting results. |
Delete Payment Method*
Argument | Type | Description |
|
| This is the unique ID of the payment method. |
Stripe Payment Method
Stripe Object
Attributes | Type | Description |
|
| Contains payment method id from Stripe. |
|
| Card's details. e.g: last 4 numbers, expiration year, etc. |
|
| A |
Setup Intent Object
Attributes | Type | Description |
|
| The Setup Intent from the payment method provider. |
|
| The client secret key from the payment method provider, helps to validate the creation of a payment method. |
|
| The status of the Setup Intent. e.g.: |
Create Stripe Payment Method*
Changes since API version 2019-02-01
2019-07-31 - Stripe SetupIntent object
Creating a Stripe payment method now needs two requests: 1)
POST /payment_methods
with payment_method to ask for an Setup Intent ID. 2)PUT /payment_methods
to update the payment method with the Stripe payment method, e.g.:pm_D1as56d14a6
2019-07-24 - SCA Changes
token
has been replaced bypayment_method_id
**Until the 14th of September 2019**, you can still use the APIs as you've used so far. After this date, if you keep using the old Stripe Tokens to do your payments, you'll be getting errors from the Banks requiring further authentication and you'll have to upgrade your APIs accordingly to use the new Payment Intent APIs. Go to our SCA section to read more.
Ask for a Setup Intent ID
This request will return you an empty payment method object except for a SetupIntent
object, where you will find 3 important fields: id
, client_secret
and status
. On your client you will need both the id
and client_secret
to generate a Stripe payment method, using the Stripe SDK.
Attribute | Type | Description |
|
| Must be |
Update the Payment Method
After you created a Stripe payment method, you will be able to update the current user's payment method with the Stripe payment method Id.
Attribute | Type | Description |
|
| Stripe payment method id. Response will contain non sensitive user card details. Refer to Stripe’s docs for payment_methods/create and stripe-js create payment method |
Vipps Payment Method
Vipps Object
Specific fields for a Vipps payment method object.
Attributes | Type | Description |
|
| Phone number of the customer. |
Create Vipps Payment Method
Attribute | Type | Description |
|
| Must be |
|
| Phone number of the customer. |
Last updated