Skip to main content
POST
/
v1
/
payment_methods
/
setup
Set up a payment method
curl --request POST \
  --url https://api.yorlet.com/v1/payment_methods/setup \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "autogiro",
  "consumer_user_link": "<string>",
  "return_url": "<string>",
  "single_use": true,
  "use_yorlet_sdk": true
}
'
{
  "id": "<string>",
  "created": 123,
  "object": "payment_method",
  "billing_details": {
    "address": {
      "line1": "<string>",
      "line2": "<string>",
      "city": "<string>",
      "country": "<string>",
      "postal_code": "<string>",
      "state": "<string>"
    },
    "email": "<string>",
    "name": "<string>",
    "phone": "<string>"
  },
  "customer": "<string>",
  "status": "chargeable",
  "type": "bacs_debit",
  "bacs_debit": {
    "fingerprint": "<string>",
    "last4": "<string>",
    "sort_code": "<string>"
  },
  "account": "<string>",
  "deleted": false
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Body

application/json
type
enum<string>
required
Available options:
autogiro,
bacs_debit,
bank_transfer,
card,
onemove,
pay_by_bank,
sepa_debit
return_url
string<uri>
single_use
boolean
use_yorlet_sdk
boolean

Response

200 - application/json

Returns a setup object if successful.

The Bacs debit payment method.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
payment_method
billing_details
object
required
customer
required
status
enum<string> | null
required
Available options:
chargeable,
pending,
failed,
null
type
enum<string>
required
Available options:
bacs_debit
bacs_debit
object
required
account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.