You'll need the ID of the customer you created.
curl https://api.yorlet.com/v1/payment_methods \-H "Authorization: Bearer {{API_KEY}}" \-H "Content-Type: application/json" \-d '{"customer": "cus_kowie32023325","type": "gbp_credit_transfer"}'
You will get the following response with the gbp_credit_transfer
{"id": "pm_kd8q8ac0zfJ1ilr5","object": "payment_method","created": 1596109238,"billing_details": {"email": "[email protected]",},"currency": "gbp","customer": "cus_kcpy8le2liwQBXTt","gbp_credit_transfer": {"account_number": "00000000","bank_name": "Barclays Bank UK PLC","sort_code": "230505","fingerprint": "6SioVL5oAjTBuTqt","refund_sort_code": null,"refund_account_number": null,"refund_account_holder_name": null},"receiver": {"amount_charged": 0,"amount_received": 0,"amount_returned": 0},"status": "pending","token": null,"type": "gbp_credit_transfer"}
When creating a payment method, its status is initially set to pending
and cannot yet be used to make a payment request. In addition, receiver[amount_received]
is set to zero since no funds have yet been transferred. Your customer must transfer the amount you request so that the necessary funds are available.
You should provide your customer the gbp_credit_transfer[sort_code]
, the gbp_credit_transfer[account_number]
, and the amount you need the customer to send. Customers create a transfer with their bank, using the information you provide. Bank transfers can take up to two days to complete, but typically complete within a day from when the customer sends the funds.
When the gbp_credit_transfer
has status=chargable
you can create a charge against it.
curl https://api.yorlet.com/v1/transactions \-H "Authorization: Bearer {{API_KEY}}" \-H "Content-Type: application/json" \-d '{"amount": 10000,"currency": "gbp","customer": "{{CUSTOMER_ID}}","payment_method": "{{PAYMENT_METHOD_ID}}","payment_method_types": ["gbp_credit_transfer"]}'