Octopus
Beta
Last updated: September 25, 2024
Octopus enables customers to pay using their contactless cards and digital wallets.
Information
To enable Octopus payments on your account, contact your Account Manager or [email protected].
Model | Gateway |
---|---|
Payment flow | Redirect |
Payment method type | Digital wallet |
One-step payment | |
Authorization | |
Capture | |
Refund | |
Partial refund | |
Chargeback | |
Recurring payment |
Octopus payment flow follows a two-step process:
post
https://api.checkout.com/payments
1{2"amount": 10,3"currency": "HKD",4"source": {5"type": "octopus"6},7"success_url": "https://example.com/success",8"failure_url": "https://example.com/failure",9"reference": "ORD-5023-4E89"10}
For the full API specification, see the API reference.
If you receive a 202 Accepted
response code, your request was successful.
1{2"id": "pay_dinkmi3v4vgutixpcw6mcdzt44",3"status": "Pending",4"processed_on": "2024-06-18T13:20:51.2352985Z",5"processing": {6"landing_url": "https://web-test.online.octopus.com.hk/oos/payment/?token=zjsdhd3",7"octopus_uri": "octopus://payment?token=zjsdhd3",8"token": "zjsdhd3"9},10"_links": {11"self": {12"href": "https://gwc.ckotech.co/payments/pay_dinkmi3v4vgutixpcw6mcdzt44"13}14}15}
The redirection step varies depending on where you are requesting the payment:
- a desktop browser
- an application on a mobile phone
To request a payment from a desktop browser:
- Ensure that the Octopus App is installed on your customer's phone.
- Redirect your customer to the
_links.self.href
URL provided in the response.
The URL will display a QR code. - Your customer must scan the code using their Octopus App and authorize the payment on their device.
- After authorizing the payment, they'll be redirected to either your success or failure URL.
To request a payment from an application:
- Ensure that the Octopus App is installed on your customer's phone.
If the application is not installed, instruct your customers to install it. - Obtain the necessary token from the
processing
object in the response:- for Android: Pass the
processing.octopus_uri
value to the Octopus App - for iOS: Use the
processing.token
value to construct a URL using a custom URL scheme to invoke the Octopus App
- for Android: Pass the
- The Octopus App is launched on your customer's phone, so they can authorize the payment there.
After you've requested the payment, you can use the id
found in the payment response to retrieve details about the payment.
For more details, see Get payment details and our API reference.
Octopus supports both partial and full refunds.
You can process refunds using the Dashboard or the Refund API.
In your test environment:
- Download the test version of the Octopus App for Android and iOS.
- Contact Octopus to top-up your test wallet.
- Perform a payment flow using the test Octopus App.
The following table lists the response codes you may receive when processing Octopus payments:
Response code | Description |
---|---|
| Refer to card issuer |
| Over daily limit |
| Customer cancellation |
| Declined Payment - Transaction has expired |
| Internal error |
Webhook | Description |
---|---|
| Occurs when an asynchronous payment request has successfully initiated. View a payment pending webhook example. |
| Occurs when the customer has approved the payment on the Octopus App. |
| Occurs when a capture is successful. View a payment captured webhook example. |
| Occurs when a capture is declined. |
| Occurs when a payment authorization request times out, or if there is a rejection during authorization. For example, due to insufficient funds, the issuer blocking the card, or a Do Not Honor instruction. View a payment declined webhook example. |
| Occurs when an APM payment has expired (not applicable to 3DS payment expiries). View a payment expired webhook example. |