Payment Services
Create Payment
Create payment service. Required fields are validated first, then business rules are applied.
post/v1/payment/orders
Headers
Content-Typestring required
The Media type of the body of the request. Default value for payment provider protocol is application/json
Acceptstring required
Acceptable media type(s) for the response. Default value for payment provider protocol is application/json
Request body
Example request
{
"store": {
"code": "SBXSTORE"
},
"transaction": {
"reference_id": "REF0000001",
"business_id": "BIZ0000001",
"account": "SBX000",
"amount": {
"currency_code": "BRL",
"value": 1500.56,
"breakdown": {
"items": {
"currency_code": "BRL",
"value": 1500
},
"shipping": {
"currency_code": "BRL",
"value": 500.56
},
"taxes": {
"currency_code": "BRL"
},
"fee": {
"currency_code": "BRL"
}
}
}
},
"country_code": "BR",
"channel": "API",
"payment_method": {
"expiration_date": "2021-01-01T00:00:00.000Z",
"payment_key": "sbx@paymentKey"
},
"payer": {
"document": {
"number": "54672396002",
"nationality": "BR"
},
"first_name": "Jhon",
"last_name": "Doe",
"full_name": "Jhon Doe Jones",
"email": "jhon_doe@domain.com",
"phone": {
"country_code": "+55",
"area": "11",
"number": "984565666",
"type": "Mobile"
}
},
"notification_url": [
"https://www.providerApi.com/notificationPayments"
],
"device": {
"ipv4": "70.56.69.13",
"ipv6": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
"location": {
"latitude": -34.56532789616039,
"longitude": -58.48945822129388
},
"merchant_device": "234c20c3-45de-41bf-b243-87ad5$RTbc3b",
"session_id": "5b8c20c3-45de-41bf-b243-87ad5d21bc3b"
}
}Response
Create payment response
Example response
{
"store": {
"code": "SBXSTORE"
},
"transaction": {
"reference_id": "REF0000001",
"business_id": "BIZ0000001",
"amount": {
"currency_code": "BRL",
"value": 1500.56
},
"provider_reference": {
"tx_id": "20000000000000026628140042292"
}
},
"order_id": "9dd3f765-a51a-49d8-b6af-a51d5a0b3f7f",
"status": {
"error": {
"code": "G01",
"message": "Gateway, payment method not supported"
}
},
"country_code": "BR",
"channel": "API",
"locations": [
{
"url": "pix.example.com/qr/9d36b84f-c70b-478f-b95c-12729b90ca25"
}
],
"return_url": "https://payments.koin.com.br/checkout/2609bd4a-60ba-8fb6-ac9f-0b28f67f679e"
}