Create Order
Develop Env
https://payments.dubpay2.com.br/api
Develop Env
https://payments.dubpay2.com.br/api
POST
https://payments.dubpay2.com.br/api
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Header Params
store-id
string
required
Example:
{{STORE_ID}}
Body Params application/json
customer
object
required
name
string
required
email
string
required
document
string
required
birthdate
string
optional
ip
string
required
phone
object
required
address
object
optional
items
array [object {3}]
required
name
string
required
quantity
string
required
price
string
required
payment
object
required
type
enum<string>
required
Allowed values:
creditdebitinvoice
installments
string
required
no cartão (colocar 1 em outras formas de
pagamento)
credit_card
object
required
currency
string
required
Examples:
USDBRLAUDCHFCADGBPEUR
shipping
object
required
name
string
required
price
string
required
discount
string
required
subtotal
string
required
total
string
required
e somando os juros, no caso de parcelas no
cartão (em centavos)
Example
{
"customer": {
"name": "string",
"email": "string",
"document": "string",
"birthdate": "string",
"ip": "string",
"phone": {
"country_code": "string",
"area_code": "string",
"number": "string"
},
"address": {
"line_1": "string",
"line_2": "string",
"zip_code": "string",
"city": "string",
"state": "string",
"country": "string"
}
},
"items": [
{
"name": "string",
"quantity": "string",
"price": "string"
}
],
"payment": {
"type": "credit",
"installments": "string",
"credit_card": {
"number": "string",
"holder_name": "string",
"exp_month": 0,
"exp_year": 0,
"cvv": "string"
},
"currency": "USD"
},
"shipping": {
"name": "string",
"price": "string"
},
"discount": "string",
"subtotal": "string",
"total": "string"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://payments.dubpay2.com.br/api/orders' \
--header 'store-id: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"customer": {
"name": "string",
"email": "string",
"document": "string",
"birthdate": "string",
"ip": "string",
"phone": {
"country_code": "string",
"area_code": "string",
"number": "string"
},
"address": {
"line_1": "string",
"line_2": "string",
"zip_code": "string",
"city": "string",
"state": "string",
"country": "string"
}
},
"items": [
{
"name": "string",
"quantity": "string",
"price": "string"
}
],
"payment": {
"type": "credit",
"installments": "string",
"credit_card": {
"number": "string",
"holder_name": "string",
"exp_month": 0,
"exp_year": 0,
"cvv": "string"
},
"currency": "USD"
},
"shipping": {
"name": "string",
"price": "string"
},
"discount": "string",
"subtotal": "string",
"total": "string"
}'
Responses
🟢200SUCCESS
application/json
Body
message
string
required
data
object
required
order_number
string
required
data
object
required
Example
{
"message": "Order created successfully",
"data": {
"order_number": "K3EG01Z0Z1",
"data": {
"order_id": "or_aa8EWN8U1fexQvbb",
"success": true,
"pix": {
"qr_code": "pix-code"
}
},
"success": true
}
}
Modified at 2025-03-07 22:13:50