Auth & Capture

Merchant Workflow

To accept the payment in this scenario, the merchant needs to complete the following steps:

  1. Completed account linking request and store returned access token

  2. Initiate an authorization request to reserve the estimated amount

  3. Initiate a capture request to collect the final payment amount

Note:

  • The amount reserved on step 2, but not captured on step 3 will be released back  to the customer
  • Authorization and Capture is useful for merchants that want to reserve customer's fund and deduct either a full or partial amount later
    • Ride Hailing, Hotel Booking

The following figure illustrates the workflow of accepting a payment in the Authorization and Capture payment scenario:

  1. Merchant calls Create Authorization to reserve the estimated amount to be charged.
    1. After successful fund reservation, merchant can inform the customer that they can successfully proceed to the next step (E.g: merchant inform the customer that their booking is successful)
  2. Merchant calls Create Capture to collect the final payment amount.
    1. Any amount reserved during Authorization, but not collected in final payment capture will be returned to the customer once capture is successful
  3. Merchant can calls Reverse Authorization to release the fund reserved during Authorization, e.g. if user cancels the booking
  4. ShopeePay will send an asynchronous message via Notify Transaction Status endpoint to inform merchants on the payment result.
  5. Merchant can also call these endpoints to check the transaction status:
EndpointType of Transactions
/auth/queryAuth Transaction
/auth/capture-queryCapture Transaction
/auth/void-queryVoid Transaction

Create Authorization

Specification

The following table is the specification of the API:

HTTP MethodPOST
Service Code63
Path..../v1.0/auth/payment
Versionv1.0

Request Parameter

FieldTypeMandatoryDescription
partnerReferenceNoStringMUnique identifier of authorization tranaction generated by merchant
  • Accepts up to 64 characters
merchantIdStringMUnique identifier of merchant in merchant system.
  • Accepts up to 64 characters.
amountObjectM
  • value
StringMTransaction amount
  • Sample: 10.000,00 will be placed with 10000.00
  • currency
StringMCurrency that is associated with the transaction amount
  • Accepted values: IDR
titleStringMAuth description.
  • Accepts up to 256 characters.
additionalInfoObjectM
  • accountToken
StringMThe accountToken used to represent the account binding between merchant’s platform and ShopeePay.
  • externalStoreId
StringMUnique identifier of store in merchant system.
  • Accepts up to 64 characters.
  • returnUrl
StringCIndicates the URL of the merchant’s platform to redirect back to once payment verification on ShopeePay (if applicable) is done.
  • authExpiryTime
StringOThe value represents when this auth transaction will expire.
  • Maximum expiry time is 14 days from the time the request is received by ShopeePay.
  • If no value is passed, the expiry time of an auth is by default 24 hours from the time the request is received by ShopeePay.
  • Using ISO 8601 timestamp format.

Sample API Request

REQUEST

{
"partnerReferenceNo": "Auth-123",
"merchantId": "Merchant123",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"title": "Order description",
"additionalInfo": {
"accountToken": "+Tgd0x95GGgt3kN7m1ItWDGqCTAVYysV",
"externalStoreId": "Store123",
"returnUrl": "https://testing.com",
"authExpiryTime": "2022-07-21T07:00:00+07:00"
}
}
arrow-svg

Copy

Response Parameter

FieldTypeMandatoryDescription
responseCodeStringMError code to specify the error returned.
responseMessageStringMDebug message to provide more information.
referenceNoStringCTransaction identifier in ShopeePay system.
partnerReferenceNoStringOUnique identifier of authorization transaction generated by merchant.
amountObjectO
  • value
StringCTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00
  • currency
StringCCurrency that is associated with the transaction amount.
  • Accepted values: IDR
paidTimeStringMUpdate time of the individual transaction.
  • Using ISO-8601 timestamp format.
additionalInfoObjectO
  • latestTransactionStatus
StringORefer to Transaction Status for specific transaction statuses
  • merchantId
StringOUnique identifier of merchant in merchant system.
  • externalStoreId
StringOUnique identifier of store in merchant system.
  • createTime
StringOCreate time of the individual transaction.
  • Using ISO-8601 timestamp format.
  • userIdHash
StringOIdentifier for customer that made the payment.
  • transactionType
uint32O1000
  • redirectUrl
StringCThe URL for the merchant’s frontend to redirect to for PIN verification, valid for 30 mins.
  • Only applicable if PIN verification is needed.
  • paymentChannel
int32OIndicates the source of fund used.

Sample API Response

Sample API Response when ShopeePay PIN is not required

RESPONSE

{
"responseCode": "2006300",
"responseMessage": "Successful",
"referenceNo": "Payment-Auth-123",
"partnerReferenceNo": "Auth-123",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"paidTime": "2022-07-20T07:10:01+07:00",
"additionalInfo": {
"merchantId": "Merchant123",
"externalStoreId": "Merchant123",
"createTime": "2022-07-20T07:10:00+07:00",
"transactionType": 1000,
"userIdHash": "15e455125fba426a4a2bb9145b3af2906813a7f222f6eab93b026ead62dc8d76",
"latestTransactionStatus": "00",
"paymentChannel": 1
}
}
arrow-svg

Copy

Sample API Response when ShopeePay PIN is required

RESPONSE

{
"responseCode": "2006300",
"responseMessage": "Successful",
"additionalInfo": {
"redirectUrl": "https://uat.shopee.co.id/s/browser/payment/auth/passcode-verify?mode=fullscreen&next=https%3A%2F%2Fuat.shopee.co.id%2Fs%2Fbrowser%2Fpayment%2Fauth%2Ftokenized PaymentResult%3Freturn_url%3Dhttps%253A%252F%252Fgoogle.com%26ticket%3DepuhRVG3km0GbWqbWvTJV1dHvdKS4zdT&return_url=https%3A%2F%2Fuat.shopee.co.id%2Fs%2Fbrowser%2Fpayment%2Fauth %2Ftokenized PaymentResult%3Fresult 30201%26return_url%3Dhttps %253A%252F%252Fgoogle.com%26ticket 3 DepuhRVG3km GbWqbWvTJV1dHvdKS4zdT&scenario=7cdccb66-cd7a-448f-a01f-b2ddd8970e53&source=TokenizedPayment&ticket-epuhRVG3 km0GbWqbWvTJV1dHvdKS4zdT"
}
}
arrow-svg

Copy

Response Code

Please refer to the following description for a general explanation of the responseCode returned during an API Response.

For a more detailed explanation, it is advisable to consult responseMessage. This field provides additional information that can offer valuable insights for troubleshooting.

Merchants may choose to display the responseMessage to their operators or staffs to facilitate prompt identification and resolution of the issue.

HTTP codeService CodeSub-error CodeResponse CodeResponse MessagePartner Action
20063002006300SuccessfulMark Auth Payment process to Pending.
  • if response.additionalInfo.redirectUrl is not empty. Redirect customer to Shopeepay page Mark Auth Payment process to corresponding status according to response.additionalInfo.latestTransactionStatus.
  • Retry request "Auth Query" periodically if didn't get final status
40063004006300Bad RequestMark Auth Payment process to Failed. Retry request with proper parameter
40063014006301
  • Invalid field format {fieldName}
  • Invalid Field Format {orderReferenceId}. Exceed Maximum Character Length
  • Invalid Field Format {promoIds}. Exceed Maximum Character Length
  • Invalid Field Format {authExpiryTime}
  • Invalid Field Format {metadata}. Exceed Maximum Characters
  • Invalid Field Format {metadata}. Maximum JSON Key Exceeded
  • Invalid Field Format {metadata}. Invalid JSON Key Name
  • Invalid Field Format {metadata}
  • Invalid Field Format {title}. Exceed Maximum Character Length
  • Invalid Field Format {return_url}
  • Invalid Field Format
Mark Auth Payment process to Failed. Retry request with proper parameter
40063024006302
  • Invalid Mandatory Field {partnerReferenceNo}
  • Invalid Mandatory Field {merchantId}
  • Invalid Mandatory Field {externalStoreId}
  • Invalid Mandatory Field {accountToken}
  • Invalid Mandatory Field {value}
  • Invalid Mandatory Field {currency}
  • Invalid Mandatory Field {returnUrl}
  • Invalid mandatory field {merchantId}. Exceed maximum character length
  • Invalid mandatory field {externalStoreId}. Exceed maximum character length
  • Invalid Mandatory Field {partnerReferenceNo}. Exceed Maximum 64 Characters
  • Invalid Mandatory Field {returnUrl}. Exceed Maximum Character Length
  • Invalid Mandatory Field {title}
  • Invalid Mandatory Field + {error message}
Mark Auth Payment process to Failed. Retry request with proper parameter
40163004016300
  • Unauthorized. Invalid Client Key
  • Unauthorized.{error message}
Mark Auth Payment process to Failed. Retry request with proper parameter
40163014016301Invalid TokenMark Auth Payment process to Failed. Retry request with proper parameter
40363014036301Feature Not Allowed Feature Not Allowed. Selected Payment Channel Is Disabled For MerchantMark Auth Payment process to Failed. Contact Shopeepay to check merchant/store supported product flow
40363024036302Exceeds Transaction Amount LimitMark Auth Payment process to Failed. Adjust request amount
40363034036303Suspected FraudMark Auth Payment process to Failed. Retry request periodically or consult to Shopeepay
40363054036305
  • Do Not Honor. User Is Not Found
  • Do Not Honor. User Is Not Activated
  • Do Not Honor. User Is Banned
  • Do Not Honor. User Is Locked
  • Do Not Honor. User Is Deleted
Mark Auth Payment process to Failed. Retry request with proper parameter or can contact Shopeepay to check the user/account status
40363064036306Feature Not Allowed. Service Is Temporarily Down For Scheduled MaintenanceMark Auth Payment process to Failed. Retry request periodically or consult to Shopeepay
40363084036308Invalid Merchant. Status Is Not ActiveMark Auth Payment process to Failed. Contact Shopeepay to check merchant/store status
40363144036314Insufficient FundsMark Auth Payment process to Failed. Check source of fund
40363234036323Account Limit ExceedMark Auth Payment process to Failed. Retry request periodically or consult to Shopeepay
40463084046308
  • Invalid Merchant
  • Invalid Store. Status Is Not Active
  • Invalid Merchant. Status Is Not Active
Mark Auth Payment process to Failed. Contact Shopeepay to check merchant/store status
40463114046311Account Information InvalidMark Auth Payment process to Failed. Retry request with proper parameter
40463134046313
  • Invalid Amount. Non Positive Amount Is Not Allowed
  • Invalid Amount
  • Invalid Amount. Amount Does Not Support Cents
Mark Auth Payment process to Failed. Retry request with proper parameter
40463184046318Inconsistent RequestMark Auth Payment process to Failed. Retry request with proper parameter
40963004096300ConflictMark Auth Payment process to Pending. Retry Retry request "Auth Query" periodically to get final status
50063005006300General ErrorMark Auth Payment process to Pending. Retry Retry request "Auth Query" periodically to get final status
50063015006301Internal Server ErrorMark Auth Payment process to Pending. Retry Retry request "Auth Query" periodically to get final status
50463005046300TimeoutMark Auth Payment process to Pending. Retry Retry request "Auth Query" periodically to get final status

Reverse Authorization

Specification

The following table is the specification of the API:

HTTP MethodPOST
Service Code67
Path .../v1.0/auth/void
Versionv1.0

Request Parameter

FieldTypeMandatoryDescription
originalReferenceNoStringMThe auth transaction identifier in ShopeePay system.
originalPartnerReferenceNoStringMThe auth transaction ID merchant wants to reverse.
partnerVoidNostringMUnique identifier of authorisation reversal transaction generated by merchant.
  • Accepts up to 64 characters.
merchantIdStringMUnique identifier of merchant in merchant system.
  • Accepts up to 64 characters.
additionalInfoObjectM
  • externalStoreId
StringMUnique identifier of store in merchant system.
  • Accepts up to 64 characters.

Sample API Request

REQUEST

{
"original ReferenceNo": "Payment-Auth-123",
"originalPartnerReferenceNo": "Auth-123",
"partnerVoidNo": "Void-123",
"merchantId": "Merchant123",
"additionalInfo": {
"externalStoreId": "Store123"
}
}
arrow-svg

Copy

Response Parameter

FieldTypeMandatoryDescription
responseCodeStringMError code to specify the error returned.
responseMessageStringMDebug message to provide more information.
voidNoStringCAuth reversal transaction identifier in ShopeePay system. The value will be returned for successful reverse auth request.
partnerVoidNoStringOUnique identifier of auth reversal transaction generated by merchant.
voidAmountObjectO
  • value
StringCTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00
  • currency
StringCCurrency that is associated with the transaction amount.
  • Accepted values:IDR
voidTimeStringCUpdate time of the individual void auth transaction.
additionalInfoObjectO
  • merchantId
StringOUnique identifier of merchant in merchant system
  • externalStoreId
StringOUnique identifier of store in merchant system
  • createTime
StringOCreate time of the individual transaction.
  • Using ISO-8601 timestamp format.
  • updateTime
StringOUpdate time of the individual transaction.
  • Using ISO-8601 timestamp format.
  • transactionType
uint32O1002
  • userIdHash
StringOIdentifier for customer that made the payment.
  • paymentChannel
int32OIndicates the source of fund used.

Sample API Response

RESPONSE

{
"responseCode": "2006700",
"responseMessage": "Successful",
"voidNo": "Shopee Pay-Void-123",
"partnerVoidNo": "Void-123",
"voidAmount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"merchantId": "Merchant123",
"externalStoreId": "Store123",
"createTime": "2022-07-20T07:10:00+07:00",
"updateTime": "2023-07-20T07:10:01+07:00",
"transactionType": 1002,
"userIdHash": "15e455125fba426a4a2bb9145b3af2906813a7f222f6eab93b026ead62dc8d76",
"paymentChannel": 1
}
}
arrow-svg

Copy

Response Code

Please refer to the following description for a general explanation of the responseCode returned during an API Response.

For a more detailed explanation, it is advisable to consult responseMessage. This field provides additional information that can offer valuable insights for troubleshooting.

Merchants may choose to display the responseMessage to their operators or staffs to facilitate prompt identification and resolution of the issue.

HTTP codeService CodeSub-error CodeResponse CodeResponse MessagePartner Action
20067002006700SuccessfulMark Auth Void process to corresponding status according to response.additionalInfo.latestTransactionStatus. Retry request "Auth Void Query" periodically if didn't get final status
40067004006700Bad RequestMark Auth Void process to Failed. Retry request with proper parameter
40067014006701Invalid Field FormatMark Auth Void process to Failed. Retry request with proper parameter
40067024006702
  • Invalid mandatory field {fieldName}
  • Invalid Mandatory Field {merchantId}
  • Invalid mandatory field {merchantId}. Exceed maximum character length
  • Invalid mandatory field {externalStoreId}. Exceed maximum character length
  • Invalid Mandatory Field {partnerVoidNo}
  • Invalid Mandatory Field {originalPartnerReferenceNo}
  • Invalid Mandatory Field {externalStoreId}
  • Invalid Mandatory Field {partnerVoidNo}. Exceed Maximum 64 Characters
  • Invalid Mandatory Field {originalPartnerReferenceNo}. Exceed Maximum 64 Characters
  • Invalid Mandatory Field + {error message}
  • Invalid Mandatory Field + {error message}
Mark Auth Void process to Failed. Retry request with proper parameter
40167004016700
  • Unauthorized. Invalid Client Key
  • Unauthorized.{error message}
Mark Auth Void process to Failed. Retry request with proper parameter
40167014016701Invalid TokenMark Auth Void process to Failed. Retry request with proper parameter
40367004036700Transaction ExpiredMark Auth Void process to Failed. Auth Payment already expired
40367014036701
  • Feature Not Allowed
  • Feature Not Allowed. Selected Payment Channel Is Disabled For Merchant
Mark Auth Void process to Failed. Contact Shopeepay to check merchant/store supported product flow
40367024036702Exceeds Transaction Amount LimitMark Auth Void process to Failed. Retry request with proper parameter
40367064036706Feature Not Allowed. Service Is Temporarily Down For Scheduled MaintenanceMark Auth Void process to Failed. Retry request periodically or consult to Shopeepay
40367144036714Insufficient FundsMark Auth Void process to Failed. Retry request periodically or consult to Shopeepay
40367154036715
  • Transaction Not Permitted. Auth Order Is Processing
  • Transaction Not Permitted
  • Transaction Not Permitted. Payment Is Already Completed
Mark Auth Void process to Failed. Retry request with proper parameter
40367234036723Account Limit ExceedMark Auth Void process to Failed. Retry request with proper parameter
40467014046701Transaction Not FoundMark Auth Void process to Failed. Retry request with proper parameter
40467084046708
  • Invalid Merchant
  • Invalid Merchant. Status Is Not Active
  • Invalid Store. Status Is Not Active
Mark Auth Void process to Failed. Contact Shopeepay to check merchant/store status
40467184046718Inconsistent RequestMark Auth Void process to Failed. Retry request with proper parameter
40967004096700ConflictMark Auth Void process to Pending. Retry request "Auth Void Query" periodically to get final status
40967014096701Duplicate partnerVoidNoMark Auth Void process to Failed. Retry request with proper parameter
50067005006700General ErrorMark Auth Void process to Pending. Retry request "Auth Void Query" periodically to get final status
50067015006701Internal Server ErrorMark Auth Void process to Pending. Retry request "Auth Void Query" periodically to get final status
50467005046700TimeoutMark Auth Void process to Pending. Retry request "Auth Void Query" periodically to get final status

Check Authorization Status

  • Use this endpoint to query the status of an auth transaction.
  • Check Auth Transaction Status can’t be used for Auth transactions which are not made using ShopeePay Payment API.

Note:

  • While a 200xx00 response generally indicates a successful API call, the actual transaction might still be processing in the background. To confirm the latest status of your transaction, we strongly recommend referring to the latestTransctionStatus field in the API response. This will provide the most up-to-date information.

Specification

The following table is the specification of the API:

HTTP MethodPOST
Service Code64
Path.../v1.0/auth/query
Versionv1.0

Request Parameter

FieldTypeMandatoryDescription
originalPartnerReferenceNoStringMUnique identifier in merchant system.
merchantIdStringMUnique identifier of merchant in merchant system.
externalStoreIdStringMUnique identifier of store in merchant system.
additionalInfoObjectM
  • value
StringMTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00

Sample API Request

REQUEST

{
"originalPartnerReferenceNo": "Auth-123",
"merchantId": "Merchant123",
"externalStoreId": "Store123",
"additionalInfo": {
"value": "10000.00"
}
}
arrow-svg

Copy

Response Parameter

FieldTypeMandatoryDescription
responseCodeStringMError code to specify the error returned
responseMessageStringMDebug message to provide more information
originalReferenceNoStringCTransaction identifier in ShopeePay system. The value will be returned for successful auth.
originalPartnerReferenceNoStringOUnique identifier in merchant system.
latestTransactionStatusStringM
paidTimeStringCUpdate time of the individual transaction.
  • The value will be returned for successful auth.
  • Using ISO-8601 timestamp format.
  • amount
ObjectO
  • value
StringCTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00
currencyStringCCurrency that is associated with the transaction amount.
  • Accepted values: IDR
additionalInfoObjectO
  • createTime
StringOCreate time of the individual transaction.
  • Using ISO-8601 timestamp format.
  • productType
uint32OIndicates the payment method used.
  • transactionType
uint32O
  • merchantId
StringOUnique identifier of merchant in merchant system.
  • externalStoreId
StringOUnique identifier of store in merchant system.
  • userIdHash
StringOUnique identifier of the customer making the payment.
  • promoIdApplied
StringOComma separated eligible promoIds of 100 characters or less (up to 20), if any.
  • These promoIds will be checked against promotional campaigns configured in ShopeePay to determine the valid reward amount the customer can receive for this transaction.
  • paymentChannel
int32OIndicates the source of fund used.

Sample API Response

RESPONSE

{
"responseCode": "2006300",
"responseMessage": "Successful",
"original ReferenceNo": "Payment-Auth-123",
"originalPartnerReferenceNo": "Auth-123",
"latestTransactionStatus": "00",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"paidTime": "2022-07-20T07:10:01+07:00",
"additionalInfo": {
"createTime": "2022-07-20T07:10:00+07:00",
"productType": 128,
"transactionType": 1000,
"userIdHash": "15e455125fba426a4a2bb9145b3af2906813a7f222f6eab93b026ead62dc8d76",
"merchantId": "Merchant123",
"externalStoreId": "Store123",
"paymentChannel": 1
}
}
arrow-svg

Copy

Response Codes

Please refer to the following description for a general explanation of the responseCode returned during an API Response.

For a more detailed explanation, it is advisable to consult responseMessage. This field provides additional information that can offer valuable insights for troubleshooting.

Merchants may choose to display the responseMessage to their operators or staffs to facilitate prompt identification and resolution of the issue.

HTTP codeService CodeSub-error CodeResponse CodeResponse MessagePartner Action
20064002006400SuccessfulMark Auth Payment to corresponding status according to response.additionalInfo.latestTransactionStatus. Retry request periodically when didn't get final status
40064004006400Bad RequestMark Auth Payment to Pending. Retry request with proper parameter
40064014006401Invalid Field FormatMark Auth Payment to Pending. Retry request with proper parameter
40064024006402
  • Invalid mandatory field {fieldName}
  • Invalid field format {fieldName}
  • Invalid mandatory field {partnerCaptureNo}
  • Invalid mandatory field {merchantId}. Exceed maximum character length
  • Invalid mandatory field {externalStoreId}. Exceed maximum character length
  • Invalid mandatory field {merchantId/externalStoreId}
  • Invalid Amount. Amount cannot contain cents
  • Invalid Mandatory Field + {error message}
Mark Auth Payment to Pending. Retry request with proper parameter
40164004016400
  • Unauthorized invalid client key
  • Unauthorized.{error message}
Mark Auth Payment to Pending. Retry request with proper parameter
40164014016401Invalid TokenMark Auth Payment to Pending. Retry request with proper parameter
40464014046401Transaction not foundMark Auth Payment to Pending. Retry request with proper parameter
40464084046408
  • Entity not found
  • Invalid Store
  • Invalid Merchant
  • Invalid Merchant, Status Is Not Active
  • Invalid Store, Status Is Not Active
  • Invalid Merchant/Store, Status Is Not Active
Mark Auth Payment to Pending. Retry request periodically or consult to Shopeepay
40464134046413
  • Invalid Amount. Mismatch with original transaction
  • Invalid amount. Mismatch with original transaction
  • Invalid Amount. Non Positive Amount Is Not Allowed
Mark Auth Payment to Pending. Retry request with proper parameter
40964004096400ConflictMark Auth Payment to Pending. Retry request periodically or consult to Shopeepay
50064005006400General ErrorMark Auth Payment to Pending. Retry request periodically or consult to Shopeepay
50064015006401Internal Server ErrorMark Auth Payment to Pending. Retry request periodically or consult to Shopeepay
50464005046400TimeoutMark Auth Payment to Pending. Retry request periodically or consult to Shopeepay

Create Capture

  • Use this endpoint to create a full or partial capture transaction using funds reserved from the corresponding authorization transaction.
  • Capture must be requested before the authorization transaction expires.
  • Only one partial capture will be accepted for each authorization transaction

Specification

The following table is the specification of the API:

HTTP MethodPOST
Service Code65
Path.../v1.0/auth/capture
Versionv1.0

Request Parameter

FieldTypeMandatoryDescription
originalReferenceNoStringMThe auth transaction identifier in ShopeePay system.
originalPartnerReferenceNoStringMThe auth transaction ID merchant wants to capture.
partnerCaptureNoStringMUnique identifier of capture transaction generated by merchant.
  • Accepts up to 64 characters.
merchantIdStringMUnique identifier of merchant in merchant system.
  • Accepts up to 64 characters.
captureAmountObjectM
  • value
StringMTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00
  • currency
StringMCurrency that is associated with the transaction amount
  • Accepted values: IDR
titleStringMCapture description.
  • Accepts up to 256 characters.
additionalInfoObjectM
  • externalStoreId
StringMUnique identifier of store in merchant system.
  • Accepts up to 64 characters.
  • useCoin
BooleanOUse this field to indicate whether the customer prefers to use or not to use coins to offset their payment on the merchant’s platform. The default value is set to false.
  • True: attempt to use coins
  • False: do not use coins
  • promoIds
StringOComma separated eligible promoIds of 100 characters or less (up to 20), if any.
  • These promoIds will be checked against promotional campaigns configured in ShopeePay to determine the valid reward amount the customer can receive for this transaction.
  • metadata
StringOAdditional information for the transaction. Additional information for the transaction.
  • This field supports up to 3 fields and needs to be sent in this format {\”field1\”:\”{Data1}\”,\”field2\”:\”{Data2}\” ,\”field3\”:\”{Data3}\”}

Sample API Request

REQUEST

{
"original ReferenceId": "Payment-Auth-123",
"originalPartnerReferenceId": "Auth-123",
"partnerCaptureNo": "Capture-123",
"merchantId": "Merchant123",
"captureAmount": {
"value": "10000.00",
"currency": "IDR"
},
"title": "Order description",
"additionalInfo": {
"externalStoreId": "Store123",
"useCoin": false,
"promoIds": "Promo1, Promo2",
"metadata": "{\"field1\":\"Data1\",\"field2\":\"Data2\",\"field3\":\"Data3\"}"
}
}
arrow-svg

Copy

Response Parameter

FieldTypeMandatoryDescription
responseCodeStringMError code to specify the error returned.
responseMessageStringMDebug message to provide more information.
captureNoStringCTransaction identifier in ShopeePay system. The value will be returned for successful capture.
partnerCaptureNoStringOUnique identifier of capture transaction generated by client.
captureAmountObjectM
  • value
StringMTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00
  • currency
StringMCurrency that is associated with the refund amount.
  • Accepted values: IDR
captureTimeStringMUpdate time of the individual transaction. Using ISO-8601 timestamp format.
additionalInfoObjectO
  • merchantId
StringOUnique identifier of merchant in merchant system
  • externalStoreId
StringOUnique identifier of store in merchant system
  • latestCaptureStatus
StringORefer to Transaction Status for specific transaction statuses
  • createTime
StringOCreate time of the individual transaction.
  • transactionType
uint32O1001 types
  • userIdHash
StringOIdentifier for customer that made the payment
  • paymentChannel
int32OIndicates the source of fund used.

Sample API Response

RESPONSE

{
"responseCode": "2006500",
"responseMessage": "Successful",
"partnerCaptureNo": "Capture-123",
"captureNo": "Payment-Capture-123",
"captureAmount": {
"value": "10000.00",
"currency": "IDR"
},
"captureTime": "2022-07-20T07:10:05+07:00",
"additionalInfo": {
"merchantId": "Merchant123",
"externalStoreId": "Store123",
"createTime": "2022-07-20T07:10:04+07:00",
"userIdHash": "15e455125fba426a4a2bb9145b3af2906813af222f6eab93b026ead62dc8d76",
"transactionType": 1001,
"latestCaptureStatus": "00",
"paymentChannel": 1
}
}
arrow-svg

Copy

Response Code

Please refer to the following description for a general explanation of the responseCode returned during an API Response.

For a more detailed explanation, it is advisable to consult responseMessage. This field provides additional information that can offer valuable insights for troubleshooting.

Merchants may choose to display the responseMessage to their operators or staffs to facilitate prompt identification and resolution of the issue.

HTTP codeService CodeSub-error CodeResponse CodeResponse MessagePartner Action
20065002006500SuccessfulMark Auth Capture process to corresponding status according to response.additionalInfo.latestTransactionStatus. Retry request "Auth Capture Query" periodically if didn't get final status
40065004006500Bad RequestMark Auth Capture process to Failed. Retry request with proper parameter
40065014006501
  • Invalid Field Format {metadata}. Exceed Maximum Characters
  • Invalid Field Format {metadata}. Maximum JSON Key Exceeded
  • Invalid Field Format {metadata}. Invalid JSON Key Name
  • Invalid Field Format {metadata}.
  • Invalid Field Format {title}. Exceed Maximum Character Length
  • Invalid Field Format
Mark Auth Capture process to Failed. Retry request with proper parameter
40065024006502
  • Invalid mandatory field {fieldName}
  • Invalid field format {fieldName}
  • Invalid field format {captureAmount.currency}
  • Invalid Mandatory Field {merchantId}
  • Invalid Mandatory Field {partnerCaptureNo}
  • Invalid Mandatory Field {externalStoreId}
  • Invalid Mandatory Field {originalPartnerReferenceNo}
  • Invalid Mandatory Field {partnerCaptureNo}. Exceed Maximum 64 Character
  • Invalid Mandatory Field {merchantId}. Exceed Maximum Character Length
  • Invalid Mandatory Field {originalPartnerReferenceNo}. Exceed Maximum 64 Character
  • Invalid mandatory field {externalStoreId}. Exceed maximum character length
  • Invalid Mandatory Field {title}
  • Invalid Mandatory Field + {error message}
40165004016500
  • Unauthorized. Invalid Client Key
  • Unauthorized.{error message}
Mark Auth Capture process to Failed. Retry request with proper parameter
40165014016501Invalid TokenMark Auth Capture process to Failed. Retry request with proper parameter
40365004036500Transaction ExpiredMark Auth Capture process to Failed. Auth Payment already expired
40365014036501
  • Feature Not Allowed
  • Feature Not Allowed. Selected Payment Channel Is Disabled For Merchant
Mark Auth Capture process to Failed. Contact Shopeepay to check merchant/store supported product flow
40365024036502Exceeds Transaction Amount LimitMark Auth Capture process to Failed. Retry request with proper parameter
40365054036505Do not honor. Invalid statusMark Auth Capture process to Failed. Retry request with proper parameter
40365064036506Feature Not Allowed. Service Is Temporarily Down For Scheduled MaintenanceMark Auth Capture process to Failed. Retry request periodically or consult to Shopeepay
40365144036514Insufficient FundsMark Auth Capture process to Failed. Retry request periodically or consult to Shopeepay
40365154036515
  • Transaction Not Permitted. Auth Order Is Processing
  • Transaction Not Permitted. Payment Is Already Completed
Mark Auth Capture process to Failed. Retry request with proper parameter
40365234036523Account Limit ExceedMark Auth Capture process to Failed. Retry request with proper parameter
40465014046501Transaction Not FoundMark Auth Capture process to Failed. Retry request with proper parameter
40465084046508
  • Invalid Merchant
  • Invalid Merchant. Status Is Not Active
  • Invalid Store
Mark Auth Capture process to Failed. Contact Shopeepay to check merchant/store status
40465114046511Account information invalidMark Auth Capture process to Failed. Retry request with proper parameter
40465134046513
  • Invalid Amount. Non Positive Amount Is Not Allowed
  • Invalid Amount
  • Invalid Amount. Amount Does Not Support Cents
Mark Auth Capture process to Failed. Retry request with proper parameter
40465184046518Inconsistent RequestMark Auth Capture process to Failed. Retry request with proper parameter
40965004096500ConflictMark Auth Capture process to Pending. Retry request "Auth Capture Query" periodically to get final status
40965014096501Duplicate partnerCaptureNoMark Auth Capture process to Failed. Retry request with proper parameter
50065005006500General ErrorMark Auth Capture process to Pending. Retry request "Auth Capture Query" periodically to get final status
50065015006501Internal Server ErrorMark Auth Capture process to Pending. Retry request "Auth Capture Query" periodically to get final status
50465005046500TimeoutMark Auth Capture process to Pending. Retry request "Auth Capture Query" periodically to get final status

Check Capture Transaction Status

  • Use this endpoint to query the status of capture transaction.
  • Check Capture Transaction Status API can’t be used for Capture transactions which are not made using ShopeePay Payment API.

Note: While a 200xx00 response generally indicates a successful API call, the actual transaction might still be processing in the background. To confirm the latest status of your transaction, we strongly recommend referring to the latestCaptureStatus field in the API response. This will provide the most up-to-date information.

Specification

The following table is the specification of the API:

HTTP MethodPOST
Service Code66
Path.../v1.0/auth/capture-query
Versionv1.0

Request Parameter

FieldTypeMandatoryDescription
originalReferenceNoStringMUnique identifier in ShopeePay system.
partnerCaptureNoStringMUnique identifier in merchant system.
merchantIdStringMUnique identifier of merchant in merchant system.
additionalInfoObjectM
  • externalStoreId
StringMUnique identifier of store in merchant system.
  • value
StringMTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00

Sample API Request

REQUEST

{
"originalReferenceNo": "Capture-123",
"partnerCaptureNo": "Payment-Capture-123",
"merchantId": "Merchant123",
"additionalInfo": {
"externalStoreId": "Store123",
"value": "10000.00"
}
}
arrow-svg

Copy

Response Parameter

FieldTypeMandatoryDescription
responseCodeStringMError code to specify the error returned
responseMessageStringMDebug message to provide more information
captureNoStringCTransaction identifier in ShopeePay system.
  • The value will be returned for successful payment.
partnerCaptureNoStringMUnique identifier in merchant system.
latestCaptureStatusStringM
  • Refer to Transaction Status for specific transaction statuses
captureTimeStringCUpdate time of the individual transaction.
  • The value will be returned for successful capture.
  • Using ISO-8601 timestamp format.
captureAmountObjectO
  • value
StringCTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00
  • currency
StringCCurrency that is associated with the transaction amount.
  • Accepted values: IDR
additionalInfoObjectO
  • createTime
StringOCreate time of the individual transaction.
  • Using ISO-8601 timestamp format.
  • productType
uint32OIndicates the payment method used.
  • transactionType
uint32O
  • merchantId
StringOUnique identifier of merchant in merchant system.
  • externalStoreId
StringOUnique identifier of store in merchant system.
  • userIdHash
StringOUnique identifier of the customer making the payment.
  • promoIdApplied
StringOComma separated eligible promoIds of 100 characters or less (up to 20), if any.
  • These promoIds will be checked against promotional campaigns configured in ShopeePay to determine the valid reward amount the customer can receive for this transaction.
  • paymentChannel
int32OIndicates the source of fund used.

Sample API Response

RESPONSE

{"responseCode": "2006600",
"responseMessage": "Successful",
"captureNo": "Capture-123",
"partnerCaptureNo": "Payment-Capture-123",
"captureTime": "2022-07-20T07:10:10+07:00",
"latestCaptureStatus": "00",
"captureAmount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"createTime": "2022-07-20T07:10:09+07:00",
"merchantId": "Merchant123",
"externalStoreId": "Store123",
"userIdHash": "15e455125fba426a4a2bb9145b3af2906813a7f222f6eab93b026ead62dc8d76",
"productType": 128,
"transactionType": 1001,
"promoIdApplied": "Promo1, Promo2",
"paymentChannel": 1
}
}
arrow-svg

Copy

Response Code

Please refer to the following description for a general explanation of the responseCode returned during an API Response.

For a more detailed explanation, it is advisable to consult responseMessage. This field provides additional information that can offer valuable insights for troubleshooting.

Merchants may choose to display the responseMessage to their operators or staffs to facilitate prompt identification and resolution of the issue.

HTTP codeService CodeSub-error CodeResponse CodeResponse MessagePartner Action
20066002006600SuccessfulMark Auth Capture to corresponding status according to response.additionalInfo.latestTransactionStatus. Retry request periodically when didn't get final status
40066014006601
  • Invalid field format {fieldName}
  • Invalid Field Format
Mark Auth Capture to Pending. Retry request with proper parameter
40066024006602
  • Invalid mandatory field {originalReferenceNo}
  • Invalid mandatory field {partnerCaptureNo}
  • Invalid mandatory field {merchantId}. Exceed maximum character length
  • Invalid mandatory field {externalStoreId}. Exceed maximum character length
  • Invalid mandatory field {merchantId/externalStoreId}
  • Invalid Amount. Amount cannot contain cents
  • Invalid Mandatory Field + {error message}
Mark Auth Capture to Pending. Retry request with proper parameter
40066004006600Bad RequestMark Auth Capture to Pending. Retry request with proper parameter
40166004016600
  • Unauthorized invalid client key
  • Unauthorized.{error message}
Mark Auth Capture to Pending. Retry request with proper parameter
40166014016601Invalid TokenMark Auth Capture to Pending. Retry request with proper parameter
40466014046601Transaction not foundMark Auth Capture to Pending. Retry request with proper parameter
40466084046608
  • Entity not found
  • Invalid Store
  • Invalid Merchant
  • Invalid Merchant, Status Is Not Active
  • Invalid Store, Status Is Not Active
  • Invalid Merchant/Store, Status Is Not Active
Mark Auth Capture to Pending. Retry request periodically or consult to Shopeepay
40466134046613
  • Invalid Amount. Mismatch with original transaction
  • Invalid amount. Mismatch with original transaction
  • Invalid Amount. Non Positive Amount Is Not Allowed
Mark Auth Capture to Pending. Retry request with proper parameter
40966004096600ConflictMark Auth Capture to Pending. Retry request periodically or consult to Shopeepay
50066005006600General ErrorMark Auth Capture to Pending. Retry request periodically or consult to Shopeepay
50066015006601Internal Server ErrorMark Auth Capture to Pending. Retry request periodically or consult to Shopeepay
50466005046600TimeoutMark Auth Capture to Pending. Retry request periodically or consult to Shopeepay

Check Void Auth-Transaction Status

  • Use this endpoint to query the status of an auth transaction that has been void.
  • Check Void Auth Transaction Status can’t be used for Auth transactions which are not made using ShopeePay Payment API.

Specification

The following table is the specification of the API:

HTTP MethodPOST
Service Code68
Path.../v1.0/auth/void-query
Versionv1.0

Request Parameter

FieldTypeMandatoryDescription
originalPartnerReferenceNoStringMUnique identifier of the transaction merchant would like to query.
originalReferenceNoStringMUnique identifier in ShopeePay system.
merchantIdStringMUnique identifier of merchant in merchant system.
partnerVoidNoStringMUnique identifier of authorization reversal transaction generated by merchant.
additionalInfoObjectM
  • amount
StringMTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00
  • transactionType
unit32O1002
  • externalStoreId
StringOUnique identifier of store in merchant system
  • Accepts up to 64 characters

Sample API Request

JS EXAMPLE

{
"originalPartnerReferenceNo": "auth_void_integration_000044",
"originalReferenceNo": "test_auth_void_integartion_00028",
"merchantId": "openapi5_m8",
"partnerVoidNo": "uat_auth_void_00024",
"additionalInfo": {
"externalStoreId": "openapi5_s8",
"amount": "1.00",
"transactionType": 1002
}
}
arrow-svg

Copy

Response Parameter

FieldSub-FieldsTypeMandatoryDescription
responseCodeStringMError code to specify the error returned
responseMessageStringMDebug message to provide more information
voidAmountobject
  • value
StringMTransaction amount.
  • Sample: 10.000,00 will be placed with 10000.00
  • currency
StringMRefers to the currency abbreviation for the transaction.
  • IDR
voidTimeStringCUpdate time of the individual void auth transaction.
latestVoidStatusStringCRefer to Transaction Status for specific transaction statuses
originalPartnerReferenceNoStringOUnique identifier of the transaction client would like to query.
originalReferenceNoStringOUnique identifier in ShopeePay system
additionalInfoobjectO
transactionobjectO
  • transactionType
uint32ORefer to Transaction Types for specific transaction types
  • userIdHash
StringOUnique identifier of the user making the payment.
  • merchantId
StringOUnique identifier of merchant in client system.
  • externalStoreId
StringOUnique identifier of store in client system.
  • paymentChannel
int32OIndicates the source of fund used. Refer to Payment Channels for the respective source of fund.

Sample API Response

RESPONSE

{
"responseCode": "2006800",
"responseMessage": "Successful",
"voidAmount": {
"value": 1,
"currency": "IDR"
},
"voidTime": "2024-07-02T15:28:36+07:00",
"latestVoidStatus": "00",
"additionalInfo": {
"transaction": {
"referenceId": "auth_void_integration_000044",
"transactionSn": "135165152606180037",
"transactionType": 1002,
"userIdHash": "a8fbf03545686dacbe22beee16512f89d8403ce5a02d42512522724c1b09cfe1",
"merchantExtId": "openapi5_m8",
"storeExtId": "openapi5_s8",
"paymentChannel": 1
}
}
}
arrow-svg

Copy

Response Code

Please refer to the following description for a general explanation of the responseCode returned during an API Response.

For a more detailed explanation, it is advisable to consult responseMessage. This field provides additional information that can offer valuable insights for troubleshooting.

Merchants may choose to display the responseMessage to their operators or staffs to facilitate prompt identification and resolution of the issue.

HTTP codeService CodeSub-error CodeResponse CodeResponse MessagePartner Action
20068002006800SuccessfulMark Auth Void to corresponding status according to response.additionalInfo.latestTransactionStatus. Retry request periodically when didn't get final status
40068004006800Bad RequestMark Auth Void to Pending. Retry request with proper parameter
40068014006801Invalid Field FormatMark Auth Void to Pending. Retry request with proper parameter
40068024006802
  • Invalid mandatory field {fieldName}
  • Invalid field format {fieldName}
  • Invalid mandatory field {merchantId}. Exceed maximum character length
  • Invalid mandatory field {externalStoreId}. Exceed maximum character length
  • Invalid mandatory field {merchantId/externalStoreId}
  • Invalid mandatory field {fieldName}. Exceed maximum character length
  • Invalid Amount. Amount cannot contain cents
  • Invalid Mandatory Field + {error message}
Mark Auth Void to Pending. Retry request with proper parameter
40168004016800
  • Unauthorized invalid client key
  • Unauthorized.{error message}
Mark Auth Void to Pending. Retry request with proper parameter
40168014016801Invalid TokenMark Auth Void to Pending. Retry request with proper parameter
40468014046801Transaction not foundMark Auth Void to Pending. Retry request with proper parameter
40468084046808
  • Entity not found
  • Invalid Store
  • Invalid Merchant
  • Invalid Merchant, Status Is Not Active
  • Invalid Store, Status Is Not Active
  • Invalid Merchant/Store, Status Is Not Active
Mark Auth Void to Pending. Retry request periodically or consult to Shopeepay
40468134046813
  • Invalid amount. Mismatch with original transaction
  • Invalid amount. Mismatch with original transaction
  • Invalid Amount. Non Positive Amount Is Not Allowed
Mark Auth Void to Pending. Retry request with proper parameter
40968004096800ConflictMark Auth Void to Pending. Retry request periodically or consult to Shopeepay
50068005006800General ErrorMark Auth Void to Pending. Retry request periodically or consult to Shopeepay
50068015006801Internal Server ErrorMark Auth Void to Pending. Retry request periodically or consult to Shopeepay
50468005046800TimeoutMark Auth Void to Pending. Retry request periodically or consult to Shopeepay

Refund Payment

Use this endpoint to request a refund for a successful transaction. Refunds are subject to refund conditions.

HTTP MethodPOST
Service Code69
Path.../v1.0/auth/refund
Versionv1.0

Refer to Refund Payment for the detail request and response parameters

Notify Transaction Status

Note: Merchant needs to confirm that both the payment amount and the originalPartnerReferenceNo correspond to the original /debit/payment-host-to-host request before considering the payment successful.

HTTP MethodPOST
Service Code56
Path.../v1.0/debit/notify
Versionv1.0

Refer to Notify Transaction Status endpoint for the detail request body and response parameters.