Skip to content

About Payment

Access scope

Multiple access scopes needed — refer to each endpoint for access scope requirements.

The Genstore payment business domain is the core business module that manages payment information by providing a series of RESTful interfaces, supporting sub domains such as order placement, refund actions, and payment order queries in the payment process. Core functions -* * Order * : Create a payment order based on the order and notify PSP for deduction. -Refund: According to the after-sales agreement, the refund will be given to the customer. - * Obtain a single payment order * *: Retrieve detailed information of the payment order based on the payment order ID associated with the order. Application scenarios -Payment Extersion: Developers can use payment development capabilities to connect third-party payment service providers to their stores as a third-party payment channel to expand their store's payment capabilities.

Endpoints

PUT /api/202412/app/account_authorize: Update account authorization result

PUT /api/202412/app/payment/{paymentId}: Update payment result

PUT /api/202412/app/capture/{captureId}: update capture result

PUT /api/202412/app/refund/{refundId}: Update refund result

PUT /api/202412/app/void/{voidId}: Update cancel capture result

PUT /api/202412/app/pre_authorize/{paymentId}: Update pre-authorized order authorization result

Payment Object

The payment object

Properties

purchaseInfoobjectrequired
+ Show child properties
amountstringrequired
clientDetailsobjectrequired
+ Show child properties
teststringrequired
manualCapturestringrequired
paymentIdstringrequired
paymentMethodobjectrequired
+ Show child properties
currencystringrequired
customerobjectrequired
+ Show child properties
bash
{
  "purchaseInfo": {
    "insurance": "",
    "itemTotal": "",
    "shipping": "",
    "taxTotal": "",
    "description": "",
    "discount": "",
    "handling": "",
    "shippingDiscount": "",
    "items": [
      {
        "unitPrice": "",
        "imgUrl": "",
        "quantity": "",
        "name": "",
        "description": "",
        "tax": "",
        "category": "",
        "sku": "",
        "virtualProduct": ""
      }
    ]
  },
  "amount": "",
  "clientDetails": {
    "acceptLanguage": "",
    "ipAddress": "",
    "userAgent": ""
  },
  "test": "",
  "manualCapture": "",
  "paymentId": "",
  "paymentMethod": {
    "data": {
      "cipherText": "",
      "salt": "",
      "ephemeralPublicKey": "",
      "suit": "",
      "returnUrl": "",
      "iv": ""
    }
  },
  "currency": "",
  "customer": {
    "phoneNumber": "",
    "shippingAddress": {
      "phoneNumber": "",
      "province": "",
      "city": "",
      "countryCode": "",
      "givenName": "",
      "familyName": "",
      "postalCode": "",
      "company": "",
      "line2": "",
      "line1": ""
    },
    "billingAddress": {
      "phoneNumber": "",
      "province": "",
      "city": "",
      "countryCode": "",
      "givenName": "",
      "familyName": "",
      "postalCode": "",
      "company": "",
      "line2": "",
      "line1": ""
    },
    "email": ""
  }
}

PUT Update account authorization result

Update the account authorization result.

Access scope

Requires ANY of the following access scopes: write_payment

Endpoint

PUT /api/202412/app/account_authorize 

Request Params

payobjectrequired
Account authorization result.
- Hide child properties
readybooleanrequired
Account activation result: true or false.

Response Data

{}
bash
curl -X PUT \ 
https://{shop}.genmystore.com/api/202412/app/account_authorize" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"pay":{
		"ready":"true"
	}
}'
json
HTTP/1.1 200 OK
{}

PUT Update payment result

Return payment result.

Access scope

Requires ANY of the following access scopes: write_payment

Endpoint

PUT /api/202412/app/payment/{paymentId} 

Request Params

payobjectrequired
The result of the payment.
- Hide child properties
resultbooleanrequired
Payment outcome: true or false.
reasonstring
Reasons for payment failure.
paymentIdstringrequired
The Genstore payment id.
channelPaymentIdstringrequired
The Payment channel side payment id.

Response Data

{}
bash
curl -X PUT \ 
https://{shop}.genmystore.com/api/202412/app/payment/{paymentId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"pay":{
		"result":"true",
		"reason":"Insufficient balance of bank card",
		"paymentId":"PI00202510281513381",
		"channelPaymentId":"2025102815"
	}
}'
json
HTTP/1.1 200 OK
{}

PUT update capture result

Returns manual capture results, success or failure.

Access scope

Requires ANY of the following access scopes: write_payment

Endpoint

PUT /api/202412/app/capture/{captureId} 

Request Params

payobjectrequired
Manually capture results.
- Hide child properties
resultbooleanrequired
Manual capture of results: true or false.
reasonstring
Manually capture the cause of failure.
captureIdstringrequired
Genstore manually captures IDs.
channelCaptureIdstringrequired
The payment channel side manually captures the ID.

Response Data

{}
bash
curl -X PUT \ 
https://{shop}.genmystore.com/api/202412/app/capture/{captureId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"pay":{
		"result":"true",
		"reason":"Payment do not support multiple captures",
		"channelCaptureId":"510281513",
		"captureId":"PI00202510281513381"
	}
}'
json
HTTP/1.1 200 OK
{}

PUT Update refund result

Returns the refund processing result, success or failure.

Access scope

Requires ANY of the following access scopes: write_payment

Endpoint

PUT /api/202412/app/refund/{refundId} 

Request Params

payobjectrequired
Returns the refund processing result.
- Hide child properties
resultbooleanrequired
Refund processing result: true or false
reasonstring
Reason for refund failure.
refundIdstringrequired
The Genstore refund id.
channelRefundIdstringrequired
Payment channel side refund id.

Response Data

{}
bash
curl -X PUT \ 
https://{shop}.genmystore.com/api/202412/app/refund/{refundId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"pay":{
		"result":"true",
		"reason":"The Reason for refund failure",
		"channelRefundId":"100202712119",
		"refundId":"RI00202510281513381"
	}
}'
json
HTTP/1.1 200 OK
{}

PUT Update cancel capture result

Returns the processing result for a merchant-initiated uncapture.

Access scope

Requires ANY of the following access scopes: write_payment

Endpoint

PUT /api/202412/app/void/{voidId} 

Request Params

payobjectrequired
Cancel capture result.
- Hide child properties
resultbooleanrequired
Uncapture Result: true or false.
reasonstring
The reason for the capture failure.
voidIdstringrequired
The genstore uncapture id.
channelVoidIdstringrequired
The Uncapture id on payment channel side.

Response Data

{}
bash
curl -X PUT \ 
https://{shop}.genmystore.com/api/202412/app/void/{voidId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"pay":{
		"result":"true",
		"reason":"Payment status is abnormal",
		"voidId":"PI00204453245701197",
		"channelVoidId":"I002044532457"
	}
}'
json
HTTP/1.1 200 OK
{}

PUT Update pre-authorized order authorization result

Update the authorization result for a pre-authorized order.

Access scope

Requires ANY of the following access scopes: write_payment

Endpoint

PUT /api/202412/app/pre_authorize/{paymentId} 

Request Params

payobjectrequired
Pre-authorized order creation result.
- Hide child properties
resultbooleanrequired
Pre-authorization order creation result: true or false.
reasonstring
The reason for the failure to create a pre-authorization order.
paymentIdstringrequired
The Genstore payment id.
channelPaymentIdstringrequired
The Payment channel side payment id.

Response Data

{}
bash
curl -X PUT \ 
https://{shop}.genmystore.com/api/202412/app/pre_authorize/{paymentId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"pay":{
		"result":"true",
		"reason":"Abnormal bank card number",
		"paymentId":"PI00202510281513381",
		"channelPaymentId":"20251028151338"
	}
}'
json
HTTP/1.1 200 OK
{}