Create a payment request

POST {{baseUrl}}/payment_requests

Documentation

In our sandbox environment, you can change the value in the reference field to mock different flows. You will receive webhook notifications for each status change.

FlowReferenceResult
SuccesssuccessfulThe payment request follows these statuses: initial -> processing -> successful.
FailedfailedThe payment request follows these statuses: initial -> processing -> failed.
ChargebackchargebackThe payment request follows these statuses: initial -> processing -> successful->chargeback.
Default(blank)The payment request follows these statuses: initial -> processing -> successful.

Create a new payment request for an existing payment method.

📘 Idempotency Keys
This method supports idempotency keys.

ParameterTypeRequiredDescription
paymentMethodIdstringtrueThe paymentMethodId that you want to pull (debit) funds from.
currencystringtrueThe three-letter ISO 4217 currency code of the transaction. Can be either: mxn or usd.
amountstringtrueThe amount of the transaction.
referencestringtrueA description for the direct debit (to appear on the customer's statement).

Request Body

{"paymentMethodId"=>"{{payment_method_id}}", "amount"=>1000, "currency"=>"mxn", "reference"=>"successful/failed/chargeback"}

HEADERS

KeyDatatypeRequiredDescription
Idempotency-Keystring(Optional, but highly recommended.) A unique identifier for this request to support idempotency. Use a UUID or
similar identifier. For more information, see our dedicated <a href="https://developers.belvo.com/docs/direct-debit-idempotency-and-whitelisting" target="_blank">Idempotency</a> article.
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;paymentRequestId&quot;:&quot;0d1a377b-b4c5-4a94-9e2e-83e59d1f6a9c&quot;}