Commerce API: Payment
The Commerce API supports three payment modes:
Stored Value
The Stored Value payment mode is typically used when you capture payment on your own platform from your customer.
It relies on a stored value balance deposited with Goody. Revenue share is credited back to the same account, so no additional revenue share reconciliation is required.
- Create an order batch with
payment_method_id
set toCOMMERCE_STORED_VALUE
. - Capture payment from your customer on your own platform.
- Once the order is accepted, the cost of the order will be deducted from your stored value account.
- Then, the revenue share will be paid into the stored value account as a separate transaction, so it can be easily separated out in your reports.
Stored Value in the sandbox is test money and can be used freely. If you want to set up stored value in the sandbox, contact your partnerships manager or support@ongoody.com and we’ll add some money into your account.
To deposit stored value in production, contact your partnerships manager or support@ongoody.com.
Hosted Payment
The Hosted Payment mode allows you to use Goody’s payment processing page once an order (typically a gift) is accepted by the recipient.
- Create an order batch with
payment_method_id
set toCOMMERCE_HOSTED_PAYMENT
. - When the gift is accepted, receive the
order.accepted
webhook. The webhook payload will show that the order is inpending_payment
status and will contain apayment_link
field. This field is also available on theOrder
object in the retrieve an order endpoint. - Send your customer the
payment_link
URL, which will contain the final cost of the order and a credit card form. - Once the customer completes payment, the order will move to
paid
status.
Tokenized Payment
Tokenized payment is available for approved partners. It will allow you to pass credit card details directly from your own platform to Goody’s payment processor. Please contact us directly if you have a use case for this.