Create a hosted Cobru payment object.
Important quirks:
payment_method_enabledmust be a JSON string.payer_redirect_urlandcallbackshould always be included.- the response field
urlis a short slug, not a full URL.
Authorization
ApiKey BearerAuth x-api-key<token>
In: header
AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://prod.cobru.co/cobru/" \ -H "Content-Type: application/json" \ -d '{ "amount": 50000, "description": "Order", "expiration_days": 1, "payment_method_enabled": "{\\"breb\\":true,\\"pse\\":true,\\"NEQUI\\":true}", "payer_redirect_url": "http://example.com", "callback": "http://example.com" }'{
"pk": 27150,
"amount": "50000.00",
"state": 0,
"date_created": "2019-08-24T14:15:22Z",
"payment_method": "string",
"url": "3gofdf6f",
"owner": "string",
"name": "string",
"payed_amount": "47605.00",
"client_assume_costs": true,
"payment_method_enabled": "{\"breb\":true,\"pse\":true,\"NEQUI\":true}",
"expiration_days": 0,
"fee_amount": 0,
"fee_iva_amount": 0,
"platform": "string",
"callback": "string",
"fee_iva": 0,
"iva_amount": 0,
"not_send_email": true,
"by_topup": true,
"bank_withdraw": "string",
"payer_redirect_url": "string",
"franchise": "string",
"idempotency_key": "string",
"wallet_bitcoin": "string",
"amount_bitcoin": "string",
"currency": "string",
"currency_code": "COP"
}{
"error": "Error en la creacion del cobru.",
"detail": "payment_method_enabled must be a JSON string"
}{
"error": "Error en la creacion del cobru.",
"detail": "payment_method_enabled must be a JSON string"
}{
"error": "Error en la creacion del cobru.",
"detail": "payment_method_enabled must be a JSON string"
}