Create order by ID
PUT- orders/{orderId} (1)
AUTHORIZATIONS (2)
-
Sandbox server (uses test data)
https://api.sandbox.payerly.tech/v1/orders/{orderId}
Production server (uses live data)
https://api.payerly.tech/v1/orders/{orderId} -
BearerAuth
PATH PARAMETERS
| Parameter | Type | Description |
|---|---|---|
orderIdrequired |
string | Merchant order id (must be unique within the merchant site) |
REQUEST BODY SCHEMA: application/json
Order Object
| Parameter | Type | Description |
|---|---|---|
description required |
string | Order description |
autoConfirm required |
boolean | Do auto payment confirmation (single message system). Pass only true. |
options |
object | Additional payment options. - recurring: recurring payments - paymentMethods: list of payment methods. If not specified, all current payment methods will be available. |
expireAt |
string (date-time) | Order expires at |
successUrl |
string | Merchant's URL for customer return (on success) |
declineUrl |
string | Merchant's URL for customer return (on decline) |
returnUrl |
string | Merchant's URL for customer return url |
callbackUrl |
string | Merchant's URL for callback |
customer |
object (customer) | Customer details: - accountId: Unique customer account id - fingerprint: Unique customer device fingerprint - ip: Customer IP address - phone: Customer phone (only numbers, with country code) - email: Customer e-mail address - fullName: Customer full name - DocumentType: Customer document type - Document: Customer document- country: Customer country (ISO 3166-1 alpha-3) - address: Customer address - city: Customer city - state: Customer state - postalCode: Customer postal code - neighborhood: Customer neighborhood address - birthdate: Customer birthdate - browserData: Object with browser data: - acceptHeader - colorDepth - language - screenHeight - screenWidth - timezone - userAgent - javaEnabled - windowHeight - windowWidth |
amountrequired |
object (amount) | Amount object: - value required : Amount value. - currency required : Amount currency (e.g., "USD", "EUR"). |
customfields |
object (customfields) | Additional fields object: - cf1: Additional field 1 - cf2: Additional field 2 - cf3: Additional field 3 - cf4: Additional field 4 - cf5: Additional field 5 |
Request samples
{
"description": "IPhone 17 Pro",
"autoConfirm": true,
"options": {
"recurring": true
},
"expireAt": "2050-12-31T23:59:59Z",
"successUrl": "https://success.domian.tld",
"declineUrl": "https://decline.domian.tld",
"returnUrl": "https://return.domian.tld",
"callbackUrl": "https://callback.domian.tld",
"customer": {
"accountId": "df1a2c9e-bc2b-11ed-8332-811eecb5ec73",
"fingerprint": "30faf01ebf161c7c7673b776820b3517|1ea851ab5b0e311ed9c690828f8dc7c6|eyJEZXZpY2VGaW5nZXJwcmludCI6IjMwZmFmMDFlYmYxNjFjN2M3NjczYjc3NjgyMGIzNTE3In0=",
"ip": "123.123.123.223",
"phone": "18001002030",
"email": "[email protected]",
"fullName": "John Doe",
"country": "USA",
"address": "Av. da Liberdade, 87",
"city": "Sao Paulo",
"state": "SP",
"postalCode": "05907",
"neighborhood": "6587 Roller Derby Lane, Toronto, ON M1R-0E9, Canada",
"birthdate": "1960-02-25",
"browserData": {
"acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"colorDepth": 32,
"language": "en",
"screenHeight": 667,
"screenWidth": 375,
"timezone": -60,
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.4 Mobile/15E148 Safari/604.1",
"javaEnabled": true,
"windowHeight": 850,
"windowWidth": 375
}
},
"amount": {
"value": "7635.01",
"currency": "USD"
},
"customFields": {
"cf1": "string",
"cf2": "string",
"cf3": "string",
"cf4": "string",
"cf5": "string"
}
}
RESPONSE HEADERS:
| Parameter | Type | Description |
|---|---|---|
Date |
string(date-time) | The Date header indicates the server time. |
RESPONSE SCHEMA: application/json
| Parameter | Type | Description |
|---|---|---|
type |
string | Object type (ORDER) Value: ORDER |
object |
object | Order object - orderId:Merchant order id- txnId:Unique transaction id - orderId :Merchant order id- createdAt:Order created at- expireAt:Order expires at- payUrl:Payment page URL (for customer redirect)- autoConfirm:Do auto order confirmation (single message system)- successUrl:Merchant's URL for customer return (on success)- declineUrl: Merchant's URL for customer return (on decline)- returnUrl: Merchant's URL for customer return url - callbackUrl: Merchant's URL for callback- amount: - value required : Amount value. - currency required : Amount currency (e.g., "USD", "EUR"). convAmount: - value required : Amount value. - currency required : Amount currency (e.g., "USD", "EUR") - paidAmount: - value required : Amount value. - currency required : Amount currency (e.g., "USD", "EUR") - status- - changedAt: Status changed - value:Status value.if you see the CLOSED status, then the time of the order has expired and he has not had a single transaction.- description:Status description- customFields: - cf1: Additional field 1 - cf2: Additional field 2 - cf3: Additional field 3 - cf4: Additional field 4 - cf5: Additional field 5 |
error |
object | Error object: - code:Error code- description:Error description- traceId:Unique request trace id (for support requests)- details:Errors details array- value:Error brief - description:Error description- fields:Errors fields array:- name:Filed name - type:Location of field (body, header) - value:Field value |
200
{
"type": "ORDER",
"object": {
"paymentId": "string",
"txnId": "string",
"orderId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"description": "string",
"autoConfirm": true,
"returnUrl": "string",
"callbackUrl": "string",
"amount": {
"value": "7635.01",
"currency": "USD"
},
"convAmount": {
"value": "7635.01",
"currency": "USD"
},
"paymentMethod": "card",
"paymentData": {
"type": "cardResponse",
"object": {
"maskedPan": "string",
"expiryDate": "string",
"cardHolder": "string",
"cardInfo": {
"issuerCountry": "USA",
"issuerName": "string"
}
}
},
"paymentToken": {
"type": "TOKEN",
"object": {
"tokenId": "string",
"expireAt": "2019-08-24T14:15:22Z",
"customer": {
"accountId": "df1a2c9e-bc2b-11ed-8332-811eecb5ec73",
"fingerprint": "30faf01ebf161c7c7673b776820b3517|1ea851ab5b0e311ed9c690828f8dc7c6|eyJEZXZpY2VGaW5nZXJwcmludCI6IjMwZmFmMDFlYmYxNjFjN2M3NjczYjc3NjgyMGIzNTE3In0=",
"ip": "123.123.123.223",
"phone": "18001002030",
"email": "[email protected]",
"fullName": "John Doe",
"documentType": "string",
"document": "string",
"country": "USA",
"address": "Av. da Liberdade, 87",
"city": "Sao Paulo",
"state": "SP",
"postalCode": "05907",
"neighborhood": "6587 Roller Derby Lane, Toronto, ON M1R-0E9, Canada",
"birthdate": "1960-02-25",
"browserData": {
"acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"colorDepth": 32,
"language": "en",
"screenHeight": 667,
"screenWidth": 375,
"timezone": -60,
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.4 Mobile/15E148 Safari/604.1",
"javaEnabled": true,
"windowHeight": 850,
"windowWidth": 375
}
},
"paymentMethod": "card",
"paymentData": {
"type": "cardResponse",
"object": {
"maskedPan": "string",
"expiryDate": "string",
"cardHolder": "string",
"cardInfo": {
"issuerCountry": "USA",
"issuerName": "string"
}
}
}
}
},
"customFields": {
"cf1": "string",
"cf2": "string",
"cf3": "string",
"cf4": "string",
"cf5": "string"
},
"status": {
"changedAt": "2019-08-24T14:15:22Z",
"value": "string",
"description": "string"
}
},
"error": {
"code": 65535,
"description": "string",
"traceId": "string",
"details": [
{
"value": "string",
"description": "string",
"fields": [
{
"name": "string",
"type": "string",
"value": "string"
}
]
}
]
}
}