Payment Requests

Endpoints

The Payment Request Object

Attributes

_id
Required
string

The ID of the payment request

secret
Required
string

The secret token of the payment request

status
Required
string
NEWSUCCEEDEDCANCELED
sellerId
Required
string
createdAt
Required
string date-time

An ISO timestamp indicating when the payment request was created

updatedAt
Required
string date-time

An ISO Timestamp indicating when the payment request was last updated

Optional Attributes

Collapse all
reference
Optional
string
processors
Optional
array<any>
Was this section helpful?
YesNo
Example
{
"_id": "string",
"secret": "string",
"amount": 10.5,
"currency": "EUR",
"checkoutId": "string",
"subscriptionId": "string",
"paymentPlanId": "string",
"paymentGatewayId": "string",
"reference": "string",
"processors": [
{
"payentGatewayType": "stripe",
"paymentGatewayId": "string",
"reference": "string",
"redirectUrl": "string",
"data": [],
"createdAt": "2030-01-23T23:00:00.123Z"
}
],
"status": "NEW",
"history": [
{
"type": "payment_request.created",
"date": "2030-01-23T23:00:00.123Z",
"data": []
}
],
"applications": [
{
"amount": 10.5,
"method": "deposit"
}
],
"customer": {
"customerId": "string",
"email": "[email protected]",
"country": "string"
},
"sellerId": "string",
"expiresAt": "2030-01-23T23:00:00.123Z",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}
PUBLIC

Create a Payment Request

Payload

secret
Required
string

The secret of the transaction

Optional Attributes

Collapse all
Responses
200
OK
400
Bad Request

Was this section helpful?

YesNo
post
/api/payments/requests
{
"checkoutId": "string",
"transactionId": "string",
"secret": "string"
}
Response
application/json
{
"_id": "string",
"secret": "string",
"amount": 10.5,
"currency": "EUR",
"checkoutId": "string",
"subscriptionId": "string",
"paymentPlanId": "string",
"paymentGatewayId": "string",
"reference": "string",
"processors": [
{
"payentGatewayType": "stripe",
"paymentGatewayId": "string",
"reference": "string",
"redirectUrl": "string",
"data": [],
"createdAt": "2030-01-23T23:00:00.123Z"
}
],
"status": "NEW",
"history": [
{
"type": "payment_request.created",
"date": "2030-01-23T23:00:00.123Z",
"data": []
}
],
"applications": [
{
"amount": 10.5,
"method": "deposit"
}
],
"customer": {
"customerId": "string",
"email": "[email protected]",
"country": "string"
},
"sellerId": "string",
"expiresAt": "2030-01-23T23:00:00.123Z",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}
PUBLIC

Get a Payment Request

Query

secret
Optional
string

Secret of the payment request

Responses
200
OK
400
Bad Request
401
Unauthorized

Was this section helpful?

YesNo
get
/api/payments/requests/{id}
Response
application/json
{
"_id": "string",
"secret": "string",
"amount": 10.5,
"currency": "EUR",
"checkoutId": "string",
"subscriptionId": "string",
"paymentPlanId": "string",
"paymentGatewayId": "string",
"reference": "string",
"processors": [
{
"payentGatewayType": "stripe",
"paymentGatewayId": "string",
"reference": "string",
"redirectUrl": "string",
"data": [],
"createdAt": "2030-01-23T23:00:00.123Z"
}
],
"status": "NEW",
"history": [
{
"type": "payment_request.created",
"date": "2030-01-23T23:00:00.123Z",
"data": []
}
],
"applications": [
{
"amount": 10.5,
"method": "deposit"
}
],
"customer": {
"customerId": "string",
"email": "[email protected]",
"country": "string"
},
"sellerId": "string",
"expiresAt": "2030-01-23T23:00:00.123Z",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}

Get Payment Requests

Query

customerId
Optional
string

Filter payment requests by customer ID

checkoutId
Optional
string

Filter payment requests by checkout ID

status
Optional

Filter payment requests by status

One of
Only one of the following types
origin
Optional

Filter payment requests by origin

One of
Only one of the following types
skip
Optional
number float

The number of objects to skip for the requested result

top
Optional
number float

A limit on the number of objects to be returned. Can range between 1 and 1000.

Responses
200
OK
400
Bad Request
401
Unauthorized

Was this section helpful?

YesNo
get
/api/payments/requests
Response
application/json
{
"docs": [
{
"_id": "string",
"secret": "string",
"amount": 10.5,
"currency": "EUR",
"checkoutId": "string",
"subscriptionId": "string",
"paymentPlanId": "string",
"paymentGatewayId": "string",
"reference": "string",
"processors": [
{
"payentGatewayType": "stripe",
"paymentGatewayId": "string",
"reference": "string",
"redirectUrl": "string",
"data": [],
"createdAt": "2030-01-23T23:00:00.123Z"
}
],
"status": "NEW",
"history": [
{
"type": "payment_request.created",
"date": "2030-01-23T23:00:00.123Z",
"data": []
}
],
"applications": [
{
"amount": 10.5,
"method": "deposit"
}
],
"customer": {
"customerId": "string",
"email": "[email protected]",
"country": "string"
},
"sellerId": "string",
"expiresAt": "2030-01-23T23:00:00.123Z",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}
],
"total": 1
}
PUBLIC

Receive Processor Info

Payload

paymentGatewayId
Required
string

The ID of the payment gateway the client intents to use

Optional Attributes

Collapse all
Responses
200
OK
400
Bad Request

Was this section helpful?

YesNo
post
/api/payments/requests/{id}/processor
{
"paymentGatewayId": "string",
"returnUrl": "string"
}
Response
application/json
{
"payentGatewayType": "stripe",
"paymentGatewayId": "string",
"reference": "string",
"redirectUrl": "string",
"data": [],
"createdAt": "2030-01-23T23:00:00.123Z"
}
PUBLIC

Confirm a Payment Request

Payload

gatewaySecret
Required
string

The secret of the payment gateway responsible for the payment

Optional Attributes

Collapse all
Responses
200
OK
400
Bad Request

Was this section helpful?

YesNo
post
/api/payments/requests/{id}/confirm
{
"gatewaySecret": "string",
"reference": "string",
"paymentStatus": "SUCCEEDED",
"paymentMethod": "visa",
"paymentMethodVariant": "applepay"
}
Response
application/json
{
"_id": "string",
"secret": "string",
"amount": 10.5,
"currency": "EUR",
"checkoutId": "string",
"subscriptionId": "string",
"paymentPlanId": "string",
"paymentGatewayId": "string",
"reference": "string",
"processors": [
{
"payentGatewayType": "stripe",
"paymentGatewayId": "string",
"reference": "string",
"redirectUrl": "string",
"data": [],
"createdAt": "2030-01-23T23:00:00.123Z"
}
],
"status": "NEW",
"history": [
{
"type": "payment_request.created",
"date": "2030-01-23T23:00:00.123Z",
"data": []
}
],
"applications": [
{
"amount": 10.5,
"method": "deposit"
}
],
"customer": {
"customerId": "string",
"email": "[email protected]",
"country": "string"
},
"sellerId": "string",
"expiresAt": "2030-01-23T23:00:00.123Z",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}
PUBLIC

Change Payment Request Payment Status

Payload

paymentStatus
Required
string

The new payment status

SUCCEEDEDFAILED
gatewaySecret
Required
string

The secret of the payment gateway responsible for the payment

Responses
200
OK
400
Bad Request

Was this section helpful?

YesNo
post
/api/payments/requests/{id}/payment-status
{
"paymentStatus": "SUCCEEDED",
"gatewaySecret": "string"
}
Response
application/json
{
"_id": "string",
"secret": "string",
"amount": 10.5,
"currency": "EUR",
"checkoutId": "string",
"subscriptionId": "string",
"paymentPlanId": "string",
"paymentGatewayId": "string",
"reference": "string",
"processors": [
{
"payentGatewayType": "stripe",
"paymentGatewayId": "string",
"reference": "string",
"redirectUrl": "string",
"data": [],
"createdAt": "2030-01-23T23:00:00.123Z"
}
],
"status": "NEW",
"history": [
{
"type": "payment_request.created",
"date": "2030-01-23T23:00:00.123Z",
"data": []
}
],
"applications": [
{
"amount": 10.5,
"method": "deposit"
}
],
"customer": {
"customerId": "string",
"email": "[email protected]",
"country": "string"
},
"sellerId": "string",
"expiresAt": "2030-01-23T23:00:00.123Z",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}
PUBLIC

Verify a payment request

Payload

paymentGatewayId
Required
string

The ID of the payment gateway the client intents to use

Optional Attributes

Collapse all
Responses
200
OK
400
Bad Request

Was this section helpful?

YesNo
post
/api/payments/requests/{id}/verify
{
"paymentGatewayId": "string",
"data": []
}
Response
application/json
{
"_id": "string",
"secret": "string",
"amount": 10.5,
"currency": "EUR",
"checkoutId": "string",
"subscriptionId": "string",
"paymentPlanId": "string",
"paymentGatewayId": "string",
"reference": "string",
"processors": [
{
"payentGatewayType": "stripe",
"paymentGatewayId": "string",
"reference": "string",
"redirectUrl": "string",
"data": [],
"createdAt": "2030-01-23T23:00:00.123Z"
}
],
"status": "NEW",
"history": [
{
"type": "payment_request.created",
"date": "2030-01-23T23:00:00.123Z",
"data": []
}
],
"applications": [
{
"amount": 10.5,
"method": "deposit"
}
],
"customer": {
"customerId": "string",
"email": "[email protected]",
"country": "string"
},
"sellerId": "string",
"expiresAt": "2030-01-23T23:00:00.123Z",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}