Create a setup payment instrument transaction

Creates a setup payment instrument transaction.

This operation makes the payment instrument available for further payments. Treat the response as a regular transaction. For example, approval links must be followed until the transaction is completed.

SecurityHTTP: CustomerJWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Request Body schema: application/json

Setup transaction resource.

websiteId
required
string (WebsiteId) <= 50 characters
currency
required
string (CurrencyCode) = 3 characters

Currency code in ISO 4217 format.

amount
number <double>
Default: 0

Amount of the transaction.

ContactObject (object) or null

Billing address. If a billing address is not supplied the address associated with the payment instrument is used. If no address is associated with the payment instrument, the customer's address is used.

redirectUrl
string or null <uri>

URL to redirect the end-user when an offsite transaction is completed. This field defaults to the configured website URL. You may use {id} or {result} as placeholders in the URL. These placeholders are replaced with the transaction ID and result. For more information, see Placeholders.

object (RiskMetadata)

Risk metadata used for 3D Secure and risk scoring.

post
/storefront/payment-instruments/{id}/setup
Request samples
application/json
{ "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "currency": "USD", "amount": 97.97, "billingAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "dob": "1980-04-01", "jobTitle": "CEO" }, "redirectUrl": "http://example.com", "riskMetadata": { "ipAddress": "93.92.91.90", "fingerprint": "pIUt3xbgX3l9g3YDiLbx", } }
Responses

201

Setup transaction created.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

422

Invalid data sent.

Response samples
application/json
{ "id": "txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0", "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "type": "3ds-authentication", "status": "completed", "result": "abandoned", "amount": 0.1, "currency": "USD", "purchaseAmount": 0.1, "purchaseCurrency": "USD", "requestAmount": 0.1, "requestCurrency": "USD", "parentTransactionId": "txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0", "childTransactions": [ "4f6cf35x-2c4y-483z-a0a9-158621f77a21" ], "invoiceIds": [ "4f6cf35x-2c4y-483z-a0a9-158621f77a21" ], "orderIds": [ "4f6cf35x-2c4y-483z-a0a9-158621f77a21" ], "planIds": [ "4f6cf35x-2c4y-483z-a0a9-158621f77a21" ], "isRebill": true, "rebillNumber": 0, "billingAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "redirectUrl": "http://example.com", "retryNumber": 0, "isRetry": true, "billingDescriptor": "string", "description": "string", "requestId": "string", "hasAmountAdjustment": true, "gatewayName": "A1Gateway", "gateway": { }, "customFields": { "foo": "bar" }, "processedTime": "2019-08-24T14:15:22Z", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "paymentInstrument": { "method": "payment-card", "paymentInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N" }, "approvalUrl": "http://example.com", "token": "string", "depositRequestId": "dep_req_0YVJ65BSGYC3EAT58SEX8KY6J7", "_links": [ ] }