Create a Payment
Base URL not set in the spec · operationId createPayment
Endpoint to create a Payment in Monato Billpay.
Authorization
BearerAuth Bearer token
Query parameters
payee_id string requiredFinch Payee ID
payer_account string requiredThe Payee Reference to be paid
amount string requiredThe amount to be paid
currency string requiredCurrency in which the amount is going to be paid
idempotency_key string Unique value generated by the client which we uses to recognize from subsequent requests
Responses
201 Successfully Payment created application/json
payment_id string payer_account string amount number currency string payee_id string status string metadata object created_at string (date-time) auth_number string 422 Unprocesable Entity application/json
error_type string error_message string This request is in the Monato · Billpay Postman collection.Download collection
Request
curl -X POST "$BASE_URL/v1/payments?payee_id=1234567&payer_account=U0000-19&amount=1000¤cy=MXN" \
-H "Authorization: Bearer $TOKEN"const res = await fetch(`${BASE_URL}/v1/payments?payee_id=1234567&payer_account=U0000-19&amount=1000¤cy=MXN`, {
method: "POST",
headers: {
"Authorization": `Bearer ${TOKEN}`,
},
});
const data = await res.json();import requests
res = requests.post(
f"{BASE_URL}/v1/payments?payee_id=1234567&payer_account=U0000-19&amount=1000¤cy=MXN",
headers={
"Authorization": f"Bearer {TOKEN}",
},
)
data = res.json()Response
{
"payment_id": "0fcbe1fb-b61b-44c3-a258-6a9d6e801804",
"payer_account": "U0000-19",
"amount": 1000,
"currency": "MXN",
"payee_id": "0d93acf6-b63d-46e8-aa5f-6f2520462608",
"status": "completed",
"metadata": {},
"created_at": "2024-04-10T19:48:43.222Z",
"auth_number": "8459344721"
}{
"error_type": "INTERNAL_ERROR",
"error_message": "There was an error while processing your request"
}