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.
Setup transaction resource.
ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.
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.
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/storefront/payment-instruments/{id}/setup
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/storefront/payment-instruments/{id}/setup
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/storefront/payment-instruments/{id}/setup
curl -i -X POST \
'https://www.rebilly.com/_mock/catalog/all/storefront/payment-instruments/{id}/setup' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"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",
"phoneNumbers": [
{
"label": "main",
"value": "1-512-777-0269",
"primary": true
}
],
"emails": [
{
"label": "main",
"value": "rebilly@example.com",
"primary": true
}
],
"dob": "1980-04-01",
"jobTitle": "CEO"
},
"redirectUrl": "http://example.com",
"riskMetadata": {
"ipAddress": "93.92.91.90",
"fingerprint": "pIUt3xbgX3l9g3YDiLbx",
"httpHeaders": {
"Content-Type": "application/json",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
},
"browserData": {
"colorDepth": 24,
"isJavaEnabled": true,
"language": "en-US",
"screenWidth": 1920,
"screenHeight": 1080,
"timeZoneOffset": 300,
"isAdBlockEnabled": true
},
"extraData": {
"kountFraudSessionId": "abcdefg12345abababab123456789012",
"payPalMerchantSessionId": "dd65ratxc5qv15iph3vyoq7l6davuowa",
"threatMetrixSessionId": "dd65ratxc5qv15iph3vyoq7l6davuowadd65ratxc5qv15iph3vyoq7l6davuowa"
}
}
}'Setup transaction created.
Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.
ID of the transaction.
ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.
Type of transaction.
Status of the transaction.
Result of the transaction.
Amount by which the purchase is completed. If an adjustment occurs, the purchased amount may differ from the requested amount.
Currency code in ISO 4217 format.
Amount of the payment request. If an adjustment occurs, the purchase amount may differ from the billing amount.
Currency code in ISO 4217 format.
ID of the parent transaction.
Specifies if the transaction is one of a number of recurring payments in a subscription, excluding trials or setup fees.
Rebill number of the transaction. A rebill number is the number of recurring payments in a subscription, excluding trials or setup fees.
URL where the end-user is redirected to when an offsite transaction is completed. The default value is the website URL.
Billing descriptor that appears on the periodic billing statement. For a credit card statement, this field commonly contains 12 or fewer characters.
Request ID of the transaction. This ID must be unique within a 24 hour period. Use this field to prevent duplicated transactions.
Name of the payment gateway that processed, or is selected to process, the transaction. This value is only available after a gateway is selected for the transaction.
Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see Custom fields.
{ "foo": "bar" }
Date and time when the transaction is processed.
Date and time when the resource is created. This value is set automatically when the resource is created.
Date and time when the resource is updated. This value is set automatically when the resource is updated.
URL to redirect the end-customer when transaction status is waiting-approval or offsite.
Details of the Dynamic Currency Conversion (DCC). If DCC is not applied to the transaction, this value is null.
Session token used for authentication. This token provides access to created orders, invoices, and transactions.
ID of the deposit request if applicable. The created transaction is based on the properties of this deposit request.
{ "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", "phoneNumbers": [ … ], "emails": [ … ], "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": { "response": { … }, "avsResponse": { … }, "cvvResponse": { … } }, "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", "hasDcc": true, "dcc": { "base": { … }, "quote": { … }, "outcome": "unprocessed", "rate": 1.25, "isForceDcc": true }, "token": "string", "depositRequestId": "dep_req_0YVJ65BSGYC3EAT58SEX8KY6J7", "_links": [ { … } ] }