Create a new Payment Transaction
POST/b/checkout/v1/pymt-txn/
Create a new Payment Transaction
Permissions
| Auth Method | Required Permissions |
|---|---|
| API Key | All permissions (admin access) |
| Basic Auth | Can add payment requests (Payment Request) or Can add e-commerce payments (E-Commerce) |
Gateway permission:
Can use pg_codefor the target payment gateway
info
The PUT operation cannot be used if the user does not have permission to use the previously defined payment gateway code on the transaction.
Creating an AutoPay subscription. Set payment_type to auto_pay and send the autopay block. Six things are easy to miss:
agreementis a full recurring agreement, not only an id. Because the agreementtypedefaults torecurring,agreement.id,frequency,amount_variability,cycle_interval_days,total_cyclesandexpiry_dateare all required. A missing field is rejected with a400that names it. Repeat the same schedule in theautopayblock: the agreement is what the gateway sees, and theautopayblock is what Ottu bills on.customer_idis required.languageis optional and defaults toen. It sets the language of the customer's self-service page and of every customer email, and cannot be changed afterwards.customer_emailis required, because every customer email goes there. A missing one returns a400with the error under theautopaykey, which looks like a problem with the autopay block. Checkcustomer_emailfirst.pg_codesmust name a gateway that supports tokenization and auto-debit, because Ottu charges every renewal by auto-debit against the card saved at checkout.amountis the first charge only."0.000"creates a trial: the card is saved, no money moves, and the subscription starts intrialinginstead ofactive.
The 201 response carries extra.autopay.subscription_id. Store it: it is your handle on the subscription. The autopay block is write-only and is not echoed back. Every call with payment_type: "auto_pay" creates a new subscription, so guard against double submits on your side. See the AutoPay guide.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 415
- 423